-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
51 lines (50 loc) · 1.49 KB
/
.eslintrc
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
{
"extends": ["sonarqube"],
"plugins": ["header"],
"ignorePatterns": [
".github",
".yarn",
"node_modules",
"design-tokens/tokens",
"dist",
"storybook-static",
"src/generated"
],
"rules": {
// Custom Echoes react config that differs from eslint-config-sonarqube
"camelcase": "off",
"no-implicit-coercion": [2, { "boolean": true, "number": true, "string": true }],
"import/no-default-export": "error",
"react/jsx-sort-props": "error",
"react/jsx-pascal-case": [2, { "allowNamespace": true }],
"react/jsx-no-constructed-context-values": "error",
"react/jsx-uses-react": "off",
"react/no-unstable-nested-components": ["error", { "allowAsProps": true }],
"react/react-in-jsx-scope": "off",
"jest/no-large-snapshots": ["error", { "maxSize": 250 }],
"header/header": ["error", "config/license/LICENSE-HEADER.txt"],
// New rules added after updating eslint packages to more recent versions than eslint-config-sonarqube
"jest/prefer-mock-promise-shorthand": "error",
"promise/catch-or-return": ["warn", { "allowThen": true, "allowFinally": true }]
},
"overrides": [
{
"files": ["*-stories.tsx", "vite.config.ts"],
"rules": {
"import/no-default-export": "off"
}
},
{
"files": ["config/scripts/*","design-tokens/build.js"],
"rules": {
"no-console": "off"
}
},
{
"files": ["**/*.snap"],
"rules": {
"header/header": "off"
}
}
]
}