Merge pull request #161 from nestjs/feat/tslint-to-eslint

Migrate from tslint to eslint
This commit is contained in:
Kamil Mysliwiec 2020-01-26 12:25:25 +01:00 committed by GitHub
commit 6e06f62bcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 993 additions and 56 deletions

24
.eslintrc.js Normal file
View File

@ -0,0 +1,24 @@
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',
},
};

999
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@
"start:dev": "nest start --watch", "start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch", "start:debug": "nest start --debug --watch",
"start:prod": "node dist/main", "start:prod": "node dist/main",
"lint": "tslint -p tsconfig.json -c tslint.json", "lint": "eslint '{src,apps,libs,test}/**/*.ts' --fix",
"test": "jest", "test": "jest",
"test:watch": "jest --watch", "test:watch": "jest --watch",
"test:cov": "jest --coverage", "test:cov": "jest --coverage",
@ -35,6 +35,11 @@
"@types/jest": "^24.0.25", "@types/jest": "^24.0.25",
"@types/node": "^13.1.6", "@types/node": "^13.1.6",
"@types/supertest": "^2.0.8", "@types/supertest": "^2.0.8",
"@typescript-eslint/eslint-plugin": "^2.12.0",
"@typescript-eslint/parser": "^2.12.0",
"eslint": "^6.7.2",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-import": "^2.19.1",
"jest": "^24.9.0", "jest": "^24.9.0",
"prettier": "^1.18.2", "prettier": "^1.18.2",
"supertest": "^4.0.2", "supertest": "^4.0.2",
@ -42,7 +47,6 @@
"ts-loader": "^6.2.1", "ts-loader": "^6.2.1",
"ts-node": "^8.6.0", "ts-node": "^8.6.0",
"tsconfig-paths": "^3.9.0", "tsconfig-paths": "^3.9.0",
"tslint": "^5.20.1",
"typescript": "^3.7.4" "typescript": "^3.7.4"
}, },
"jest": { "jest": {

View File

@ -1,18 +0,0 @@
{
"defaultSeverity": "error",
"extends": ["tslint:recommended"],
"jsRules": {
"no-unused-expression": true
},
"rules": {
"quotemark": [true, "single"],
"member-access": [false],
"ordered-imports": [false],
"max-line-length": [true, 150],
"member-ordering": [false],
"interface-name": [false],
"arrow-parens": false,
"object-literal-sort-keys": false
},
"rulesDirectory": []
}