-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
156 lines (155 loc) · 4.92 KB
/
.eslintrc
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{
"parser": "@typescript-eslint/parser", // Specifies the ESLint parser
"ignorePatterns": [
"**/*.pcss",
"**/*.css",
"**/*.less",
"**/*.json",
"**/*.cy.tsx"
],
"parserOptions": {
"ecmaVersion": 2020, // Allows for the parsing of modern ECMAScript features
"sourceType": "module", // Allows for the use of imports,
"ecmaFeatures": {
"jsx": true // Allows for the parsing of JSX,
},
"project": "tsconfig.json",
"tsconfigRootDir": ".",
"projectFolderIgnoreList": [
"node_modules/*",
"node_modules",
"dist",
"build",
".yarn",
"build-utils",
"./src/styles",
"plugins"
]
},
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react/recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"plugins": ["prettier", "react", "react-hooks", "node"],
"rules": {
"eqeqeq": ["error", "smart"],
"react/jsx-wrap-multilines": "warn",
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react/jsx-filename-extension": "off",
"react/jsx-indent": "off",
"react/require-default-props": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-closing-tag-location": "off",
"react/jsx-indent-props": "off",
"react/jsx-closing-bracket-location": "off",
"react/prop-types": "off",
"react-hooks/rules-of-hooks": "error",
"react/display-name": "off",
"react-hooks/exhaustive-deps": [
"warn",
{
"additionalHooks": "(useRecoilCallback)"
}
],
"prettier/prettier": "error",
"@typescript-eslint/ban-ts-comment": [
"warn",
{
"ts-expect-error": false,
"ts-ignore": true,
"ts-nocheck": false,
"ts-check": false
}
],
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-use-before-define": ["error"],
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"prefer-destructuring": "off",
"prefer-template": "off",
"react/destructuring-assignment": "off",
"no-param-reassign": "error",
"import/order": [
"warn",
{
"alphabetize": {
"order": "asc" /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */,
"caseInsensitive": true /* ignore case. Options: [true, false] */
},
"newlines-between": "always"
}
],
"no-duplicate-imports": "warn",
"import/named": "off",
"import/namespace": "off",
"import/default": "off",
"import/no-named-as-default-member": "error",
"import/extensions": "off",
"import/no-unresolved": "off",
"import/prefer-default-export": "off",
"import/no-unused-modules": ["off"],
"import/no-unassigned-import": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true,
"optionalDependencies": true,
"peerDependencies": true
}
],
"no-underscore-dangle": [
"warn",
{ "allow": ["_network", "_lastBlockNumber"] }
],
"sort-keys": "off",
"comma-dangle": "off",
"@typescript-eslint/comma-dangle": ["off"],
"no-use-before-define": "off",
"spaced-comment": "warn",
"max-len": "off",
"indent": "off",
"no-console": "off",
"arrow-body-style": "off",
"no-multiple-empty-lines": "warn",
"no-restricted-globals": "off",
"eslint linebreak-style": "off",
"object-curly-newline": "off",
"no-shadow": "off"
},
"settings": {
"react": {
"createClass": "createReactClass", // Regex for Component Factory to use,
// default to "createReactClass"
"pragma": "React", // Pragma to use, default to "React"
"fragment": "Fragment", // Fragment to use (may be a property of <pragma>), default to "Fragment"
"version": "detect" // React version. "detect" automatically picks the version you have installed.
// You can also use `16."off"`, `16.3`, etc, if you want to override the detected value.
// default to latest and warns if missing
// It will default to "detect" in the future
}
}
}