-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
116 lines (116 loc) · 3.34 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
106
107
108
109
110
111
112
113
114
115
116
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2023,
sourceType: "module",
ecmaFeatures: {
jsx: true,
legacyDecorators: true,
},
},
extends: [
"airbnb",
"airbnb/hooks",
"plugin:react/recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"plugin:unicorn/recommended",
"prettier",
"plugin:prettier/recommended",
],
plugins: ["react", "@typescript-eslint", "unicorn", "prettier"],
env: {
jest: true,
browser: true,
node: true,
es6: true,
},
settings: {
react: {
pragma: "React",
version: "detect",
},
"import/resolver": {
node: {
extensions: [".tsx", ".ts", ".js", ".json"],
},
typescript: {
project: "./tsconfig.json",
},
},
},
overrides: [
{
files: ["**/*.d.ts"],
rules: {
"import/no-duplicates": 0,
},
},
],
globals: {
document: true,
navigator: true,
window: true,
node: true,
},
rules: {
"prettier/prettier": 2,
"no-continue": 0,
"no-shadow": 0,
"no-console": 1,
"unicorn/no-useless-undefined": 0,
"consistent-return": 0,
"unicorn/no-null": 0,
"import/prefer-default-export": 1,
"no-param-reassign": [2, { props: true, ignorePropertyModificationsFor: ["draft", "prev"] }],
"react/display-name": 0,
"react/jsx-props-no-spreading": 0,
"import/no-extraneous-dependencies": 0,
"react/prop-types": 0,
"react/jsx-uses-react": 0,
"react/react-in-jsx-scope": 0,
"react/require-default-props": 0,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/no-noninteractive-element-interactions": 0,
"@typescript-eslint/no-unused-vars": 2,
"@typescript-eslint/no-shadow": 2,
"@typescript-eslint/consistent-type-imports": 2,
"react-hooks/rules-of-hooks": 2,
"react-hooks/exhaustive-deps": 2,
"unicorn/no-array-reduce": 0,
"unicorn/no-array-for-each": 0,
"unicorn/prefer-module": 0,
"unicorn/prevent-abbreviations": 0,
"unicorn/prefer-export-from": 0,
"react/no-array-index-key": 1,
"react/jsx-filename-extension": [2, { extensions: [".tsx", ".ts", ".jsx", ".js"] }],
"react/function-component-definition": [
2,
{ namedComponents: "arrow-function", unnamedComponents: "arrow-function" },
],
"import/extensions": [
2,
"ignorePackages",
{
js: "never",
jsx: "never",
ts: "never",
tsx: "never",
},
],
"import/no-anonymous-default-export": 2,
"unicorn/filename-case": [
2,
{
cases: {
kebabCase: false,
camelCase: true,
snakeCase: false,
pascalCase: true,
},
},
],
},
};