-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
68 lines (68 loc) · 2.23 KB
/
.eslintrc.json
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
67
68
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "sonarjs", "import", "promise"],
"env": {
"node": true
},
"extends": [
"eslint:all",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:sonarjs/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:promise/recommended",
"prettier"
],
"rules": {
"no-undefined": "off",
"eqeqeq": ["error"],
"camelcase": "off",
"no-ternary": "off",
"no-nested-ternary": "off",
"one-var": "off",
"id-length": "off",
"sort-keys": "off",
"sort-vars": "off",
"no-magic-numbers": "off",
"spaced-comment": ["error", "always", {"exceptions": ["-"], "markers": ["/"]}],
"arrow-parens": ["error", "as-needed"],
"arrow-body-style": ["error", "as-needed"],
"prefer-destructuring": ["error", {"AssignmentExpression": {"array": false}}],
"no-multiple-empty-lines": ["error", {"max": 1, "maxEOF": 0, "maxBOF": 0}],
"quotes": ["error", "single", {"avoidEscape": true, "allowTemplateLiterals": true}],
"linebreak-style": ["error", "unix"],
"eol-last": ["error", "always"],
"comma-dangle": ["error", "never"],
"semi": ["error", "always"],
"max-len": ["error", {"code": 120, "ignoreComments": true, "ignoreTrailingComments": true}],
"sort-imports": ["error", {"ignoreCase": true, "ignoreDeclarationSort": true}],
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", ["parent", "sibling"]],
"newlines-between": "always",
"alphabetize": {"order": "asc", "caseInsensitive": false}
}
],
"@typescript-eslint/no-unused-vars": ["error"],
"sonarjs/no-duplicate-string": ["error", 5],
"sonarjs/cognitive-complexity": ["error", 20],
"promise/catch-or-return": ["error", {"allowFinally": true}],
"require-await": "off"
},
"settings": {
"import/resolver": {"node": {"extensions": [".ts", ".tsx"]}, "typescript": {}}
},
"overrides": [
{
"files": ["test/**"],
"rules": {
"sonarjs/no-duplicate-string": "off",
"max-lines-per-function": "off",
"max-statements": "off"
}
}
]
}