-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy path.eslintrc.js
39 lines (39 loc) · 1.4 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
module.exports = {
parser: "@typescript-eslint/parser",
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "airbnb-typescript/base", "plugin:prettier/recommended"],
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
project: "./tsconfig.eslint.json",
},
env: {
node: true,
es6: true,
},
plugins: ["@typescript-eslint", "prettier", "security", "import"],
rules: {
"prettier/prettier": "error",
"no-var": "error",
"prefer-const": "error",
"no-unused-vars": ["warn", { argsIgnorePattern: "^_" }], // needs to be set to "error" later
"no-console": "warn",
"@typescript-eslint/naming-convention": "off", // needs to be removed later
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"security/detect-object-injection": "warn",
"security/detect-unsafe-regex": "error",
"import/extensions": "off",
"security/detect-object-injection": "off", // turning off Injection Sink rule
"@typescript-eslint/no-throw-literal": "off", // temp deactivated needs to be removed once fixed
},
settings: {},
overrides: [
{
files: ["*.ts", "*.tsx"],
rules: {
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
},
},
],
};