-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
105 lines (104 loc) · 3.6 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
const warnOnLocal = process.env.LINT_ERRORS ? "error" : "warn";
module.exports = {
extends: ["plugin:react/recommended"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 6,
sourceType: "module",
project: ["./tsconfig.json", "./cypress/tsconfig.json"],
ecmaFeatures: {
modules: true,
},
},
settings: {
react: {
version: "detect",
},
},
rules: {
"no-console": warnOnLocal,
"@typescript-eslint/array-type": ["error", { default: "array-simple" }],
"@typescript-eslint/class-name-casing": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"jsx-a11y/accessible-emoji": "error",
"jsx-a11y/alt-text": "error",
"jsx-a11y/anchor-has-content": "error",
"jsx-a11y/anchor-is-valid": "error",
"jsx-a11y/aria-activedescendant-has-tabindex": "error",
"jsx-a11y/aria-props": "error",
"jsx-a11y/aria-proptypes": "error",
"jsx-a11y/aria-role": "error",
"jsx-a11y/aria-unsupported-elements": "error",
"jsx-a11y/click-events-have-key-events": "error",
"jsx-a11y/heading-has-content": "error",
"jsx-a11y/html-has-lang": "error",
"jsx-a11y/iframe-has-title": "error",
"jsx-a11y/img-redundant-alt": "error",
"jsx-a11y/interactive-supports-focus": "error",
"jsx-a11y/label-has-associated-control": [
"error",
{ some: ["nesting", "id"] },
],
"jsx-a11y/lang": "error",
"jsx-a11y/media-has-caption": "error",
"jsx-a11y/mouse-events-have-key-events": "error",
"jsx-a11y/no-access-key": "error",
"jsx-a11y/no-autofocus": "error",
"jsx-a11y/no-distracting-elements": "error",
"jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
"jsx-a11y/no-noninteractive-element-interactions": "error",
"jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
"jsx-a11y/no-noninteractive-tabindex": "error",
"jsx-a11y/no-redundant-roles": "error",
"jsx-a11y/no-static-element-interactions": "error",
"jsx-a11y/role-has-required-aria-props": "error",
"jsx-a11y/role-supports-aria-props": "error",
"jsx-a11y/scope": "error",
"jsx-a11y/tabindex-no-positive": "error",
"mocha/no-exclusive-tests": "error",
"no-null/no-null": "error",
"no-sequences": "error",
"no-shadow": "error",
"no-unused-expressions": warnOnLocal,
"no-unused-vars": warnOnLocal,
"padding-line-between-statements": [
warnOnLocal,
{
blankLine: "always",
prev: "import",
next: "*",
},
{
blankLine: "never",
prev: "import",
next: "import",
},
],
"react-hooks/exhaustive-deps": "error",
"react-hooks/rules-of-hooks": "error",
"react/display-name": "off",
"react/jsx-boolean-value": ["error", "never"],
"react/no-unknown-property": "error",
"react/prop-types": "off",
"react/react-in-jsx-scope": "error",
},
plugins: [
"@typescript-eslint",
"jsx-a11y",
"mocha",
"no-null",
"react-hooks",
"react",
],
};