-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
76 lines (76 loc) · 2.12 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
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
"jest/globals": true,
},
extends: ["plugin:react/recommended", "airbnb", "plugin:jest/recommended"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["react", "react-hooks", "@typescript-eslint", "jest"],
rules: {
"no-restricted-syntax": "off",
"guard-for-in": "off",
// suppress errors for missing 'import React' in files
quotes: ["error", "double"],
"class-methods-use-this": "off",
"no-shadow": "off",
"max-len": "off",
"react/react-in-jsx-scope": 0,
"object-curly-newline": 0,
"react/jsx-one-expression-per-line": 0,
"react/jsx-filename-extension": [2, {
extensions: [".js", ".jsx", ".ts", ".tsx"],
}],
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/interactive-supports-focus": 0,
"consistent-return": ["error", { treatUndefinedAsUnspecified: false }],
"import/extensions": [
"error",
"ignorePackages",
{
js: "never",
jsx: "never",
ts: "never",
tsx: "never",
},
],
"import/prefer-default-export": 0,
"react/function-component-definition": 0,
"react/no-unescaped-entities": 0,
"import/no-extraneous-dependencies": 0,
"react/jsx-props-no-spreading": 0,
"no-plusplus": 0,
"no-param-reassign": 0,
"space-before-blocks": 0,
indent: ["error", 2],
"eol-last": 0,
"no-prototype-builtins": 0,
"react/no-children-prop": 0,
"react/jsx-key": 1,
"no-underscore-dangle": 0,
"no-continue": 0,
"linebreak-style": ["error", process.platform === "win32" ? "windows" : "unix"],
"react/jsx-uses-react": "off",
"no-minusminus": 0,
"react/jsx-indent": ["error", 2],
"react/jsx-indent-props": ["error", 2],
"no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
radix: 0,
"no-unsafe-optional-chaining": 0,
},
settings: {
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".ts", ".tsx"],
},
},
},
};