chore: switch from tslint to eslint
This commit is contained in:
parent
16fa19d3e9
commit
9b3d6f5d68
5 changed files with 2147 additions and 181 deletions
16
.eslintrc.js
Normal file
16
.eslintrc.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
node: true,
|
||||
browser: true,
|
||||
es6: true,
|
||||
},
|
||||
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
plugins: ["@typescript-eslint"],
|
||||
rules: {
|
||||
"@typescript-eslint/no-explicit-any": 0,
|
||||
"@typescript-eslint/ban-ts-comment": 0,
|
||||
"@typescript-eslint/no-non-null-assertion": 0,
|
||||
},
|
||||
};
|
9
dashboard/.eslintrc.js
Normal file
9
dashboard/.eslintrc.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
module.exports = {
|
||||
extends: ["../.eslintrc.js"],
|
||||
rules: {
|
||||
"@typescript-eslint/no-unused-vars": 0,
|
||||
"no-self-assign": 0,
|
||||
"no-empty": 0,
|
||||
"@typescript-eslint/no-var-requires": 0,
|
||||
},
|
||||
};
|
2264
package-lock.json
generated
2264
package-lock.json
generated
File diff suppressed because it is too large
Load diff
10
package.json
10
package.json
|
@ -5,17 +5,19 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"format": "prettier --write './backend/src/**/*.{css,html,js,json,ts,tsx}' './dashboard/src/**/*.{css,html,js,json,ts,tsx}'",
|
||||
"lint": "tslint './backend/src/**/*.{js,ts,tsx}' './dashboard/src/**/*.{js,ts,tsx}'",
|
||||
"lint": "eslint './backend/src/**/*.{js,ts,tsx}' './dashboard/src/**/*.{js,ts,tsx}'",
|
||||
"codestyle-check": "prettier --check './backend/src/**/*.{css,html,js,json,ts,tsx}' './dashboard/src/**/*.{css,html,js,json,ts,tsx}'"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.59.5",
|
||||
"@typescript-eslint/parser": "^5.59.5",
|
||||
"eslint": "^8.40.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"husky": "^3.0.9",
|
||||
"lint-staged": "^9.4.2",
|
||||
"prettier": "^2.8.4",
|
||||
"prettier-plugin-organize-imports": "^3.2.2",
|
||||
"tsc-watch": "^6.0.4",
|
||||
"tslint": "^5.13.1",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"typescript": "^5.0.4"
|
||||
},
|
||||
"husky": {
|
||||
|
@ -25,7 +27,7 @@
|
|||
},
|
||||
"lint-staged": {
|
||||
"*.ts": [
|
||||
"tslint",
|
||||
"eslint",
|
||||
"prettier --write",
|
||||
"git add"
|
||||
]
|
||||
|
|
29
tslint.json
29
tslint.json
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||
|
||||
"rules": {
|
||||
"no-var-requires": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"max-classes-per-file": false,
|
||||
"prefer-conditional-expression": false,
|
||||
"prefer-object-spread": false,
|
||||
"forin": false,
|
||||
"member-access": false,
|
||||
"member-ordering": false,
|
||||
"variable-name": false,
|
||||
"ordered-imports": false,
|
||||
"curly": [true, "ignore-same-line"],
|
||||
"no-console": {
|
||||
"severity": "warning"
|
||||
},
|
||||
"no-bitwise": false,
|
||||
"interface-over-type-literal": false,
|
||||
"interface-name": false,
|
||||
"no-submodule-imports": false,
|
||||
"no-floating-promises": true,
|
||||
"no-string-literal": false,
|
||||
"no-object-literal-type-assertion": false,
|
||||
"no-angle-bracket-type-assertion": false,
|
||||
"no-implicit-dependencies": false
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue