Narrow linting rules and fix for eslintrc for js files

This commit is contained in:
hensm
2022-04-27 22:28:38 +01:00
parent 5e2d9a2fbc
commit dececa46c3
27 changed files with 298 additions and 246 deletions

View File

@@ -1,30 +1,48 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [ "@typescript-eslint" ],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"plugins": ["@typescript-eslint"],
"extends": ["eslint:recommended", "prettier"],
"rules": {
"no-useless-escape": "off",
"no-prototype-builtins": "off",
"no-async-promise-executor": "off",
"semi": [ "error", "always"],
"no-multiple-empty-lines": [ "error", { "max": 2 }],
"no-console": [ "error", {
"allow": [ "info", "warn", "error" ]
}],
"semi": ["error", "always"],
"no-multiple-empty-lines": ["error", { "max": 2 }],
"no-console": [
"error",
{
"allow": ["info", "warn", "error"]
}
]
},
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-this-alias": [ "error", {
"allowedNames": [ "this_" ]
}]
}
"overrides": [
{
"files": ["*/bin/**/*.js"],
"env": {
"node": true
}
},
{
"files": ["**/*.ts", "**/*.tsx"],
"extends": "plugin:@typescript-eslint/recommended",
"rules": {
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_" }
],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-this-alias": [
"error",
{
"allowedNames": ["this_"]
}
]
}
}
]
}