-
Notifications
You must be signed in to change notification settings - Fork 8
/
.eslintrc.js
59 lines (59 loc) · 1.73 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
module.exports = {
parser: "@babel/eslint-parser",
env: {
browser: true,
es6: true,
node: true,
},
extends: [
"airbnb",
"plugin:react/recommended",
"plugin:prettier/recommended",
],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly",
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2021,
sourceType: "module",
requireConfigFile: false,
babelOptions: {
presets: ["@babel/preset-react"],
},
},
// plugins: ["only-warn", "react", "prettier"],
plugins: ["react", "prettier"],
ignorePatterns: ["styles.js"],
rules: {
"react/no-array-index-key": ["warn"],
"react/jsx-key": ["warn"],
"prettier/prettier": ["warn"],
"arrow-parens": [2, "always"],
"react/function-component-definition": "off",
"react/jsx-wrap-multilines": 0,
"react/react-in-jsx-scope": "off",
"react/jsx-filename-extension": [2, { extensions: [".js", ".jsx"] }],
"import/no-extraneous-dependencies": 0,
"import/no-cycle": 0,
camelcase: 0,
"react/jsx-props-no-spreading": 0,
"import/no-unresolved": 0,
"import/extensions": 0,
"import/prefer-default-export": "off",
"no-param-reassign": ["error", { props: false }],
"guard-for-in": 0,
"no-unused-vars": ["warn"],
"ban-ts-comment": "off",
"react/prop-types": "off",
"no-plusplus": ["error"],
"react/jsx-no-bind": "off",
"jsx-a11y/no-static-element-interactions": "off", // need to remove this rule
"jsx-a11y/click-events-have-key-events": "off", // need to remove this rule
"jsx-a11y/no-noninteractive-element-interactions": "off", // need to remove this rule
"react/jsx-no-useless-fragment": "off", // need to remove this rule
},
};