-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.eslintrc.js
105 lines (105 loc) · 2.47 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
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
module.exports = {
env: {
webextensions: true,
},
extends: [
`preact`,
`plugin:sonarjs/recommended`,
`plugin:unicorn/recommended`,
`plugin:import/errors`,
`plugin:import/warnings`,
`plugin:import/typescript`,
`plugin:react-hooks/recommended`,
`plugin:@typescript-eslint/recommended`,
],
globals: {
__PATH_PREFIX__: true,
},
parser: `@typescript-eslint/parser`,
plugins: [
`@typescript-eslint`,
`json-format`,
`disable`,
`sonarjs`,
`sort-keys-fix`,
`import`,
`react-hooks`,
`jest`,
],
processor: `disable/disable`,
root: true,
rules: {
"@typescript-eslint/ban-ts-comment": `warn`,
"@typescript-eslint/no-empty-function": `warn`,
"@typescript-eslint/no-explicit-any": `warn`,
"@typescript-eslint/no-unused-vars": [
`warn`,
{ ignoreRestSiblings: true },
],
"comma-dangle": [
`warn`,
`always-multiline`,
],
// "import/no-duplicate-imports": `warn`,
"import/no-named-as-default": `off`,
"jsx-a11y/accessible-emoji": `off`,
"no-duplicate-imports": `off`,
"no-empty-function": `off`,
"prefer-const": `warn`,
quotes: [
`error`,
`backtick`,
],
"security/detect-non-literal-fs-filename": `off`,
"security/detect-non-literal-require": `off`,
"security/detect-object-injection": `off`,
semi: [
`warn`,
`never`,
],
"sonarjs/no-nested-template-literals": `warn`,
"sort-keys-fix/sort-keys-fix": `warn`,
"unicorn/consistent-function-scoping": `off`,
"unicorn/filename-case": [
`error`,
{
cases: {
camelCase: true,
pascalCase: true,
},
ignore: [
`[A-Z]{2,4}`,
`webextension-polyfill-ts`,
],
},
],
"unicorn/no-array-reduce": `warn`,
"unicorn/no-await-expression-member": `off`,
"unicorn/no-null": 0,
"unicorn/prefer-code-point": `warn`,
"unicorn/prefer-dom-node-text-content": `off`,
"unicorn/prefer-logical-operator-over-ternary": `warn`,
"unicorn/prefer-module": `off`,
"unicorn/prefer-node-protocol": `off`,
"unicorn/prevent-abbreviations": [
`warn`,
{
allowList: {
Props: true,
eLitigation: true,
props: true,
},
},
],
},
settings: {
"import/resolver": {
node: {
paths: [`src`],
},
},
node: {
tryExtensions: [`.tsx`], // append tsx to the list as well
},
},
}