-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
65 lines (65 loc) · 1.76 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
module.exports = {
env: {
browser: true,
es2021: true,
jest: true,
},
extends: [
"airbnb",
"plugin:sonarjs/recommended",
"plugin:eslint-comments/recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"prettier",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: "module",
},
rules: {
"no-console": ["warn", { allow: ["error"] }],
"no-plusplus": ["error", { allowForLoopAfterthoughts: true }],
"no-use-before-define": "off",
"no-underscore-dangle": ["error", { allowAfterThis: true }],
"import/extensions": [
"error",
"ignorePackages",
{
js: "never",
mjs: "never",
jsx: "never",
ts: "never",
tsx: "never",
},
],
"@typescript-eslint/prefer-ts-expect-error": "warn",
"eslint-comments/disable-enable-pair": ["warn", { allowWholeFile: true }],
"react/jsx-props-no-spreading": ["error", { html: "ignore" }],
"react/no-unescaped-entities": ["warn", { forbid: [">"] }],
"react/require-default-props": "off",
"jsx-a11y/label-has-associated-control": ["error", { assert: "either" }],
"react/jsx-filename-extension": [1, { extensions: [".jsx", ".tsx"] }],
"import/no-extraneous-dependencies": ["error", { devDependencies: true }],
},
overrides: [
{
files: [
"*.test.js?(x)",
"*.spec.js?(x)",
"*.test.ts?(x)",
"*.spec.ts?(x)",
"*.stories.ts?(x)",
],
rules: {
"@typescript-eslint/explicit-module-boundary-types": "off",
"import/named": "off",
"react/jsx-props-no-spreading": "off",
"react/prop-types": "off",
},
},
],
};