-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
64 lines (64 loc) · 1.87 KB
/
.eslintrc.json
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
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:react/recommended",
"airbnb",
"prettier"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react",
"prettier"
],
"rules": {
// prettier
"prettier/prettier": [
"error",
{
"printWidth": 120,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "always",
"endOfLine" : "auto"
}
],
// disable consistent types of function components
"react/function-component-definition": "off",
// suppress errors for missing 'import React' in files
"react/react-in-jsx-scope": "off",
// disable forbid-prop-types check
"react/forbid-prop-types": "off",
// allow jsx syntax in js files (for next.js project)
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
// allow single export from a file without default
"import/prefer-default-export": "off",
// allow files without named imports
"import/export": 0,
// allow exported name as identifier for default export
"import/no-named-as-default": 0,
// allow prop spreading
"react/jsx-props-no-spreading": "off",
"jsx-a11y/label-has-associated-control": [ "error", {
"required": {
"some": [ "nesting", "id" ]
}
}],
"jsx-a11y/label-has-for": [ "error", {
"required": {
"some": [ "nesting", "id" ]
}
}],
"max-len": 0,
"class-methods-use-this": "off"
}
}