Custom ESLint rules for Sellernote.
Just developing for my team.
You'll first need to install ESLint:
$ npm i -D eslint
Next, install eslint-plugin-sellernote
:
$ npm install -D eslint-plugin-sellernote
Add sellernote
to the plugins section of your configuration file. Note that below configuration examples are for flat-configuration format.
import sellernote from 'eslint-plugin-sellernote';
export default [
{
plugins: {
// ...
sellernote,
},
},
];
Then configure the rules you want to use under the Supported Rules
section.
export default [
// ....
{
rules: {
// .....
'sellernote/rule-name-to-add': 'warn',
},
},
];
Name | Description |
---|---|
repository-method-prefix | The method name in repository should start with findOne , findMany for read, create for creation, update for modification, delete for deletion |
typeorm-column-should-specify-type | TypeORM Column annotation should specify a type property |
typeorm-nullable-column-should-have-null-union-type | TypeORM nullable column should have null union type |
use-api-operation | Use @ApiOperation for API endpoints |