Switch to eslint and fix issues

This commit is contained in:
hensm
2021-04-26 05:36:55 +01:00
parent 2d0fa4c844
commit d478742c4b
100 changed files with 1537 additions and 608 deletions

40
.eslintrc.json Normal file
View File

@@ -0,0 +1,40 @@
{
"root": true
, "parser": "@typescript-eslint/parser"
, "plugins": ["@typescript-eslint"]
, "extends": [
"eslint:recommended"
, "plugin:@typescript-eslint/recommended"
]
, "rules": {
"max-len": [ "error", 80, {
"tabWidth": 4
, "ignorePattern": "//|.*(\"|`);?$"
, "ignoreStrings": true
, "ignoreTemplateLiterals": true
, "ignoreRegExpLiterals": true
}]
, "space-before-function-paren": [ "error", {
"anonymous": "always"
, "named": "never"
, "asyncArrow": "always"
}]
, "no-useless-escape": "off"
, "no-prototype-builtins": "off"
, "no-async-promise-executor": "off"
, "semi": [ "error", "always"]
, "comma-dangle": [ "error", "never"]
, "comma-style": [ "error", "first"]
, "no-multiple-empty-lines": [ "error", { "max": 2 }]
, "no-console": [ "error", {
"allow": [ "info", "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"
}
}