-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.cjs
46 lines (46 loc) · 1.46 KB
/
.eslintrc.cjs
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
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": [
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:prettier/recommended",
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": './tsconfig.json',
},
"plugins": [
"@typescript-eslint",
"react",
"prettier",
],
"rules": {
'react/function-component-definition': 0, // disable airbnb bugged rule https://github.com/airbnb/javascript/issues/2505
'react/react-in-jsx-scope': 0, // no need to import React in every component (since React v17)
'linebreak-style': 0, // disable LF requirement on windows (CLRF),
'react/no-array-index-key': 0,
'react/jsx-no-useless-fragment': [
'error',
{
"allowExpressions": true,
"allowTypedFunctionExpressions": true,
},
],
'no-param-reassign': 0, // allow params mutation,
'react/jsx-props-no-spreading': 0,
'react/require-default-props': 0, // defaultProps will be deprecated
"import/no-extraneous-dependencies": [
"error",
{"devDependencies": true}
],
// '@typescript-eslint/no-require-imports': 0,
}
}