chore: add and apply eslint

This commit is contained in:
Axel Cocat 2022-05-14 18:44:50 +02:00
parent 7cd2748d33
commit bb6428955f
17 changed files with 1455 additions and 132 deletions

33
.eslintrc.json Normal file
View file

@ -0,0 +1,33 @@
{
"env": {
"es2021": true
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"rules": {
"semi": ["error", "always"],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"args": "none"
}
],
"no-duplicate-imports": "warn",
"no-promise-executor-return": "warn",
"quote-props": ["warn", "as-needed"],
"indent": "off",
"@typescript-eslint/indent": [
"error",
"tab",
{
"ignoredNodes": [
"FunctionExpression > .params[decorators.length > 0]",
"FunctionExpression > .params > :matches(Decorator, :not(:first-child))",
"ClassBody.body > PropertyDefinition[decorators.length > 0] > .key"
],
"SwitchCase": 1
}
]
}
}