Setup eslint and enforce rules
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-06-02 22:36:25 -05:00
parent 82e7a1f299
commit 1d5056b753
149 changed files with 6104 additions and 3114 deletions

View File

@@ -1,17 +1,15 @@
import {Template} from "../Template"
import {UniversalPath} from "../../util"
import {Template} from '../Template'
/**
* Template that generates a new middleware class in app/http/middlewares.
*/
const middleware_template: Template = {
const templateMiddleware: Template = {
name: 'middleware',
fileSuffix: '.middleware.ts',
description: 'Create a middleware class that can be applied to routes.',
baseAppPath: ['http', 'middlewares'],
render(name: string, fullCanonicalName: string, targetFilePath: UniversalPath) {
return `import {Middleware} from "@extollo/lib"
import {Injectable} from "@extollo/di"
render(name: string) {
return `import {Middleware, Injectable} from '@extollo/lib'
/**
* ${name} Middleware
@@ -25,7 +23,7 @@ export class ${name} extends Middleware {
}
}
`
}
},
}
export { middleware_template }
export { templateMiddleware }