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 "../../cli"
import {UniversalPath} from "../../util"
import {Template} from '../../cli'
/**
* Template for creating new database model classes in app/models.
*/
const model_template: Template = {
const templateModel: Template = {
name: 'model',
fileSuffix: '.model.ts',
baseAppPath: ['models'],
description: 'Create a new class that represents a record in a database',
render: (name: string, fullCanonicalName: string, targetFilePath: UniversalPath) => {
return `import {Model} from "@extollo/orm"
import {Injectable} from "@extollo/di"
render: (name: string) => {
return `import {Injectable, Model} from "@extollo/lib"
/**
* ${name} Model
@@ -24,7 +22,7 @@ export class ${name} extends Model<${name}> {
protected static key = '${name.toLowerCase()}_id';
}
`
}
},
}
export { model_template }
export { templateModel }