-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.json
164 lines (159 loc) · 4.7 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
{
"root": true,
"env": {
"browser": true,
"es2020": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:sonarjs/recommended",
"plugin:unicorn/recommended",
"plugin:jsonc/recommended-with-json",
"plugin:jsonc/recommended-with-jsonc",
"plugin:jsonc/recommended-with-json5",
"plugin:jsonc/prettier",
"prettier"
],
"parserOptions": {
"ecmaVersion": "latest",
"project": "tsconfig.json",
"tsconfigRootDir": "./",
"sourceType": "module",
// "extraFileExtensions": [".vue"],
"parser": "@typescript-eslint/parser"
},
"plugins": ["no-secrets", "import", "sonarjs", "unicorn", "@typescript-eslint", "prettier"],
"settings": {
"import/resolver": {
"typescript": {
"project": "tsconfig.json"
}
}
},
"rules": {
"array-bracket-spacing": "error",
"default-case": "error",
"comma-dangle": ["error", "always-multiline"],
"no-else-return": "error",
"no-self-compare": "error",
"no-undef-init": "error",
"no-unneeded-ternary": "error",
"no-var": "error",
"object-curly-spacing": ["error", "always"],
"prefer-const": "error",
"quotes": ["error", "single"],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/consistent-type-exports": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/member-ordering": [
"error",
{
"default": [
"static-field",
"decorated-field",
"abstract-field",
"instance-field",
"constructor",
"static-method",
"instance-method",
"abstract-method",
"decorated-method"
]
}
],
"@typescript-eslint/no-confusing-void-expression": "error",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/no-loop-func": "error",
"@typescript-eslint/no-meaningless-void-operator": "error",
"@typescript-eslint/no-mixed-enums": "error",
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unsafe-unary-minus": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-useless-empty-export": "error",
"@typescript-eslint/no-useless-template-literals": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"import/first": "error",
"import/no-unresolved": [
"error",
{
"ignore": [
// "\\.vue$",
"\\.svg$",
"\\env.json$"
]
}
],
"prettier/prettier": "error",
"sonarjs/cognitive-complexity": ["warn", 15],
"sonarjs/no-duplicate-string": "warn",
"sonarjs/no-identical-functions": "warn",
"unicorn/no-null": "off",
"unicorn/prefer-code-point": "off",
"unicorn/numeric-separators-style": "warn",
"unicorn/prevent-abbreviations": [
"warn",
{
"allowList": {
"env": true,
"e": true,
"acc": true,
"el": true,
"args": true,
"arg": true
}
}
],
"unicorn/consistent-function-scoping": [
"error",
{
"checkArrowFunctions": false
}
],
"unicorn/no-array-reduce": "off",
"unicorn/filename-case": "off",
"unicorn/explicit-length-check": "off",
"unicorn/prefer-spread": "off",
"unicorn/prefer-optional-catch-binding": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-array-for-each": "off",
"unicorn/no-useless-undefined": "off",
"unicorn/prefer-object-from-entries": "off",
"unicorn/require-array-join-separator": "off",
"unicorn/no-hex-escape": "off",
"unicorn/no-object-as-default-parameter": "off"
},
"ignorePatterns": [
"node_modules",
".eslintrc.json",
"*.stories.ts",
"dist",
".cicd",
".docker"
],
"overrides": [
{
"files": ["*.json", "*.json5", "*.jsonc"],
"parser": "jsonc-eslint-parser"
}
]
}