-
Notifications
You must be signed in to change notification settings - Fork 42
/
.eslintrc.js
66 lines (62 loc) · 1.52 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
const unusedVarsCfg = [
"warn",
{ vars: "all", args: "none", ignoreRestSiblings: false, varsIgnorePattern: "_" },
];
module.exports = {
env: {
node: true,
es6: true,
es2020: true,
mocha: true,
},
plugins: ["simple-import-sort", "sonarjs"],
extends: [
"plugin:sonarjs/recommended",
// "plugin:import/recommended",
// "plugin:import/typescript",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
],
parserOptions: {
ecmaVersion: 2020,
// sourceType: "module"
},
rules: {
// "ter-indent": [2, {"FunctionDeclaration": {"parameters": "first"}}],
"import/no-extraneous-dependencies": 0,
"import/prefer-default-export": "off",
"max-classes-per-file": 0,
"max-len": [
"error",
{
code: 110,
ignoreTrailingComments: true,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
},
],
"no-underscore-dangle": 0,
"simple-import-sort/imports": "warn",
"sort-imports": "off",
"no-unused-vars": unusedVarsCfg,
"@typescript-eslint/no-unused-vars": unusedVarsCfg,
"@typescript-eslint/consistent-type-assertions": "off",
"@typescript-eslint/no-dynamic-delete": "off",
"sonarjs/cognitive-complexity": ["error", 16],
"import/no-named-as-default-member": "off",
// "@typescript-eslint/no-var-requires": "off",
// TODO: remove this rule
"@typescript-eslint/no-explicit-any": "off",
},
overrides: [
{
files: ["**/*.js"],
rules: {
"@typescript-eslint/no-var-requires": "off",
},
},
],
ignorePatterns: ["**/*.json"],
};