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 controller in the app/http/controllers directory.
*/
const controller_template: Template = {
const templateController: Template = {
name: 'controller',
fileSuffix: '.controller.ts',
description: 'Create a controller class that can be used to handle requests.',
baseAppPath: ['http', 'controllers'],
render(name: string, fullCanonicalName: string, targetFilePath: UniversalPath) {
return `import {Controller, view} from "@extollo/lib"
import {Inject, Injectable} from "@extollo/di"
render(name: string) {
return `import {Controller, view, Inject, Injectable} from '@extollo/lib'
/**
* ${name} Controller
@@ -25,7 +23,7 @@ export class ${name} extends Controller {
}
}
`
}
},
}
export { controller_template }
export { templateController }