3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-14 21:31:50 +00:00

chore: switch from tslint to eslint

This commit is contained in:
Dragory 2023-05-08 21:53:09 +03:00
parent 16fa19d3e9
commit 9b3d6f5d68
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
5 changed files with 2147 additions and 181 deletions

16
.eslintrc.js Normal file
View 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
View 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

File diff suppressed because it is too large Load diff

View file

@ -5,17 +5,19 @@
"private": true, "private": true,
"scripts": { "scripts": {
"format": "prettier --write './backend/src/**/*.{css,html,js,json,ts,tsx}' './dashboard/src/**/*.{css,html,js,json,ts,tsx}'", "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}'" "codestyle-check": "prettier --check './backend/src/**/*.{css,html,js,json,ts,tsx}' './dashboard/src/**/*.{css,html,js,json,ts,tsx}'"
}, },
"devDependencies": { "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", "husky": "^3.0.9",
"lint-staged": "^9.4.2", "lint-staged": "^9.4.2",
"prettier": "^2.8.4", "prettier": "^2.8.4",
"prettier-plugin-organize-imports": "^3.2.2", "prettier-plugin-organize-imports": "^3.2.2",
"tsc-watch": "^6.0.4", "tsc-watch": "^6.0.4",
"tslint": "^5.13.1",
"tslint-config-prettier": "^1.18.0",
"typescript": "^5.0.4" "typescript": "^5.0.4"
}, },
"husky": { "husky": {
@ -25,7 +27,7 @@
}, },
"lint-staged": { "lint-staged": {
"*.ts": [ "*.ts": [
"tslint", "eslint",
"prettier --write", "prettier --write",
"git add" "git add"
] ]

View file

@ -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
}
}