chore: replace tslint with eslint (pull request #1)

This commit is contained in:
donbot 2020-03-27 20:41:55 +00:00
parent 67226c1117
commit ecd499cba9
4 changed files with 1578 additions and 29 deletions

27
.eslintrc.js Normal file
View File

@ -0,0 +1,27 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
],
root: true,
env: {
node: true,
jest: true,
},
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/ban-types': 'off',
},
};

1546
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -39,6 +39,11 @@
"devDependencies": {
"@nestjs/common": "7.0.5",
"@nestjs/core": "7.0.5",
"@typescript-eslint/eslint-plugin": "^2.25.0",
"@typescript-eslint/parser": "^2.25.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-import": "^2.20.1",
"husky": "4.2.3",
"lint-staged": "10.0.9",
"prettier": "2.0.2",

View File

@ -1,29 +0,0 @@
{
"defaultSeverity": "error",
"extends": ["tslint:recommended"],
"jsRules": {},
"rules": {
"quotemark": [true, "single", "avoid-escape"],
"object-literal-sort-keys": false,
"ordered-imports": [
true,
{
"import-sources-order": "any",
"named-imports-order": "any"
}
],
"no-console": [false],
"interface-name": [true, "never-prefix"],
"eofline": false,
"linebreak-style": [false],
"indent": false,
"member-access": false,
"ban-types": false,
"max-classes-per-file": [false],
"member-ordering": [false],
"no-var-requires": false,
"one-line": [false],
"array-type": [false]
},
"rulesDirectory": []
}