-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
165 lines (165 loc) · 5.55 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
165
{
"root": true,
"plugins": [
"@typescript-eslint",
"prettier",
"promise",
"react",
"sort-keys-fix",
"unicorn",
"unused-imports",
"sonarjs",
"i18next"
],
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:promise/recommended",
"plugin:import/errors",
"plugin:import/typescript",
"plugin:import/warnings",
"plugin:unicorn/recommended",
"plugin:sonarjs/recommended",
"plugin:i18next/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"project": "./tsconfig.json",
"parser": "@typescript-eslint/parser",
"sourceType": "module",
"projectFolderIgnoreList": ["build", "node_modules", "public", "dist"]
},
"env": {
"browser": true,
"node": true,
"es6": true
},
"rules": {
"arrow-parens": [2, "always"],
"semi": [2],
"quotes": ["error", "double"],
"linebreak-style": ["error", "unix"],
"no-empty": "warn",
"react/react-in-jsx-scope": "off",
"curly": "error",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-misused-promises": "warn",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/no-unused-expressions": "warn",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-var-requires": "warn",
"@typescript-eslint/prefer-regexp-exec": "warn",
"@typescript-eslint/restrict-plus-operands": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
"@typescript-eslint/unbound-method": "warn",
"import/order": "error",
"import/default": "error",
"import/export": "warn",
"import/extensions": "off",
"import/first": "error",
"import/group-exports": "off",
"import/namespace": "error",
"import/no-absolute-path": "error",
"import/no-anonymous-default-export": "error",
"import/no-cycle": "warn",
"import/no-deprecated": "error",
"import/no-duplicates": "error",
"import/no-dynamic-require": "off",
"import/no-extraneous-dependencies": "error",
"import/no-mutable-exports": "error",
"import/no-namespace": "warn",
"import/no-restricted-paths": "error",
"import/no-self-import": "error",
"import/no-unresolved": "off",
"import/no-unused-modules": "error",
"import/no-useless-path-segments": "error",
"import/no-webpack-loader-syntax": "error",
"max-lines": [
"warn",
{ "max": 300, "skipBlankLines": true, "skipComments": true }
],
"max-lines-per-function": [
"warn",
{ "max": 100, "skipBlankLines": true, "skipComments": true }
],
"unused-imports/no-unused-imports-ts": "error",
"unicorn/consistent-destructuring": "error",
"unicorn/consistent-function-scoping": "error",
"unicorn/error-message": "error",
"unicorn/explicit-length-check": "error",
"unicorn/filename-case": "off",
"unicorn/import-style": "error",
"unicorn/no-abusive-eslint-disable": "error",
"unicorn/no-array-callback-reference": "error",
"unicorn/no-array-for-each": "error",
"unicorn/no-array-method-this-argument": "error",
"unicorn/no-array-reduce": "off",
"unicorn/no-await-expression-member": "error",
"unicorn/no-new-array": "error",
"unicorn/no-null": "error",
"unicorn/no-object-as-default-parameter": "error",
"unicorn/no-useless-undefined": ["error", { "checkArguments": false }],
"unicorn/prefer-array-some": "error",
"unicorn/prefer-at": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-node-protocol": "off",
"unicorn/prefer-number-properties": "error",
"unicorn/prefer-prototype-methods": "error",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-slice": "error",
"unicorn/prefer-ternary": "off",
"unicorn/prefer-top-level-await": "error",
"unicorn/prevent-abbreviations": [
"error",
{
"ignore": ["i18n", "e2e"]
}
],
"sonarjs/cognitive-complexity": "error",
"sonarjs/no-all-duplicated-branches": "error",
"sonarjs/no-collapsible-if": "error",
"sonarjs/no-identical-expressions": "error",
"sonarjs/no-identical-functions": "error",
"sonarjs/no-redundant-jump": "error",
"sonarjs/no-small-switch": "error",
"sonarjs/no-use-of-empty-return-value": "error",
"sonarjs/no-nested-template-literals": "warn",
"sort-keys-fix/sort-keys-fix": "off",
"no-restricted-imports": [
"error",
{
"patterns": [
{
"group": ["../*"],
"message": "Relative imports from parent directories are not allowed."
}
]
}
]
}
}