-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.react.cjs
62 lines (61 loc) · 1.52 KB
/
.eslintrc.react.cjs
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
const { settings, parser, parserOptions, rules } = require("./.eslintrc.cjs");
module.exports = {
parser,
parserOptions,
settings,
env: {
browser: true,
node: true,
"jest/globals": true,
},
extends: [
"airbnb",
"airbnb-typescript",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"prettier",
"plugin:jest-dom/recommended",
"plugin:testing-library/dom",
"plugin:css-modules/recommended",
],
plugins: [
"@typescript-eslint",
"jest",
"jest-dom",
"testing-library",
"react",
"react-hooks",
"css-modules",
],
rules: {
...rules,
"css-modules/no-unused-class": "warn",
"jsx-a11y/control-has-associated-label": "warn",
"jsx-a11y/anchor-is-valid": "off",
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error",
"react/destructuring-assignment": "off",
"react/jsx-curly-brace-presence": [
"error",
{ children: "ignore", props: "never" },
],
"react/jsx-filename-extension": "off",
"react/jsx-props-no-spreading": "off",
"react/state-in-constructor": ["error", "never"],
"react/require-default-props": "off",
"react/no-unused-prop-types": "error",
"react/prop-types": "off",
"import/no-extraneous-dependencies": [
"error",
{ devDependencies: ["**/__tests__/**", "**/__stories__/**"] },
],
},
overrides: [
{
files: ["*test.ts?(x)"],
rules: {
"@typescript-eslint/no-var-requires": "off",
},
},
],
};