-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
105 lines (105 loc) · 3.72 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
module.exports = {
"env": {
"browser": true,
"es2021" : true,
"node" : true,
},
"extends" : ["eslint:recommended", "plugin:react/recommended", "plugin:import/recommended", "plugin:react/jsx-runtime"],
"ignorePatterns": ["**/node_modules/*"],
"overrides" : [],
"parserOptions" : {
"ecmaVersion": "latest",
"sourceType" : "module",
},
"plugins": [
"etc",
"import",
"react",
"sort-keys-fix",
"unused-imports",
],
"rules": {
"array-bracket-newline": [
"error",
{
"minItems" : 5,
"multiline": true,
},
],
"array-bracket-spacing" : ["error", "never"],
"array-element-newline" : ["error", { "minItems": 5, "multiline": true }],
"comma-dangle" : ["error", { "arrays": "only-multiline", "objects": "only-multiline" }],
"comma-spacing" : ["error", { "after": true, "before": false }],
"etc/no-commented-out-code": "error",
"id-length" : ["error", { "exceptions": ["i", "j", "id"], "min": 3, "properties": "never" }],
"import/order" : [
"error",
{
"alphabetize": {
"caseInsensitive": true,
"order" : "asc",
},
"groups" : ["builtin", "external", "internal"],
"newlines-between": "always",
"pathGroups" : [
{
"group" : "builtin",
"pattern" : "react",
"position": "before",
},
],
"pathGroupsExcludedImportTypes": ["react"],
},
],
"indent" : ["error", 2, { "MemberExpression": 1, "SwitchCase": 1 }],
"key-spacing" : ["error", { "align": "colon" }],
"linebreak-style" : ["error", "unix"],
"newline-after-var" : ["error", "always"],
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 3 }],
"no-console" : "error",
"no-multi-spaces" : ["error", { exceptions: { "VariableDeclarator": true } }],
"no-multiple-empty-lines" : ["error", { "max": 1 }],
"no-unused-vars" : ["error", { "args": "after-used", "vars": "all" }],
"no-var" : "error",
"object-curly-newline" : [
"error",
{
"ExportDeclaration": { "minProperties": 6, "multiline": true },
"ImportDeclaration": { "minProperties": 6, "multiline": true },
"ObjectExpression" : { "minProperties": 6, "multiline": true },
"ObjectPattern" : { "minProperties": 6, "multiline": true },
},
],
"object-curly-spacing" : ["error", "always"],
"object-property-newline" : ["error", { "allowAllPropertiesOnSameLine": true }],
"padding-line-between-statements": [
"error",
{
blankLine: "always",
next : "*",
prev : ["const", "let", "var"],
},
{
blankLine: "any",
next : ["const", "let", "var"],
prev : ["const", "let", "var"],
},
{
blankLine: "always",
next : "*",
prev : ["case", "default"],
}
],
"quotes" : ["error", "double"],
"react/jsx-first-prop-new-line" : "error",
"react/jsx-max-props-per-line" : ["error", { "maximum": { "multi": 1, "single": 3 } }],
"react/jsx-newline" : "error",
"react/jsx-props-no-multi-spaces" : "error",
"react/prop-types" : "off",
"semi" : ["error", "always"],
"sort-keys-fix/sort-keys-fix" : "error",
"space-infix-ops" : ["error", { "int32Hint": false }],
"unused-imports/no-unused-imports": "error",
},
"settings": { "react": { "version": "detect" } },
};