Use default NestJS lint config

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2020-07-24 21:47:41 +02:00
parent f4caee2ac7
commit 1aca4a2986
No known key found for this signature in database
GPG key ID: 6017AF117F9756CB
2 changed files with 23 additions and 32 deletions

View file

@ -1,39 +1,26 @@
module.exports = { module.exports = {
'root': true, parser: '@typescript-eslint/parser',
'parser': '@typescript-eslint/parser', parserOptions: {
'parserOptions': { project: 'tsconfig.json',
'tsconfigRootDir': __dirname, sourceType: 'module',
'project': ['./tsconfig.json'],
}, },
'plugins': [ plugins: ['@typescript-eslint/eslint-plugin'],
'@typescript-eslint', extends: [
],
'extends': [
'standard',
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking', 'prettier',
'plugin:import/recommended', 'prettier/@typescript-eslint',
'plugin:import/typescript'
], ],
'env': { root: true,
'node': true env: {
node: true,
jest: true,
}, },
'rules': { rules: {
// at some point all of these should return to their default "error" state '@typescript-eslint/interface-name-prefix': 'off',
// but right now, this is not a good choice, because too many places are '@typescript-eslint/explicit-function-return-type': 'off',
// wrong. '@typescript-eslint/no-explicit-any': 'off',
'import/first': ['warn'],
'indent': ['warn'],
'no-console': ['warn'],
'no-multiple-empty-lines': ['warn'],
'no-multi-spaces': ['warn'],
'object-curly-spacing': ['warn'],
'one-var': ['warn'],
'quotes': ['warn'],
'space-infix-ops': ['warn'],
'import/no-default-export': ['error'],
'@typescript-eslint/no-unused-vars': ['warn', { "argsIgnorePattern": "^_+$" }], '@typescript-eslint/no-unused-vars': ['warn', { "argsIgnorePattern": "^_+$" }],
} '@typescript-eslint/explicit-module-boundary-types': 'off',
} },
};

4
.prettierrc Normal file
View file

@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}