-
Notifications
You must be signed in to change notification settings - Fork 103
/
.eslintrc
100 lines (95 loc) · 3.12 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
{
"extends": [
"react-app",
"plugin:react/all",
"plugin:jest/recommended",
"plugin:promise/recommended",
"plugin:security/recommended"
],
"plugins": [
"jest",
"react",
"react-hooks",
"react-redux",
"security",
"unicorn",
"promise",
"import"
],
"settings": {
"import/resolver": {
"webpack": {
"config": "./config/webpack.config.js"
}
}
},
"rules": {
"semi": [2, "always"],
"eol-last": ["error", "always"],
"security/detect-object-injection": [0],
"promise/prefer-await-to-callbacks": "warn",
"promise/prefer-await-to-then": "warn",
"promise/always-return": "warn",
"react/jsx-indent": [2, 2, {"indentLogicalExpressions": true, "checkAttributes": true}],
"react/jsx-props-no-spreading": [0],
"react/jsx-no-bind": [0],
"react/jsx-indent-props": [2, 2],
"react/function-component-definition": [1, { "namedComponents": "arrow-function", "unnamedComponents": "arrow-function" }],
"react/jsx-max-props-per-line": [1, { "when": "multiline" }],
"react/jsx-no-literals": [0],
"react/jsx-max-depth": [0],
"react/jsx-sort-props": [0],
"react/jsx-fragments": ["warn", "element"],
"react/sort-prop-types": [0],
// "import/no-unused-modules": [1, {"unusedExports": true}], // uncomment to find out what files are unused
"no-unused-vars": "warn",
"no-multi-spaces": "warn",
"no-restricted-syntax": "off",
"arrow-parens": "warn",
"comma-dangle": ["warn", "always-multiline"],
"padded-blocks": ["warn", "never"],
"react/require-default-props": "warn",
"linebreak-style": "off",
"arrow-body-style": "off",
"no-param-reassign": "off",
"react/no-typos": "off",
"func-names": "off",
"import/no-named-as-default-member": "off",
"import/no-named-as-default": "off",
"import/prefer-default-export": "off",
"jsx-a11y/anchor-is-valid": [ "error", {
"components": [ "Link" ],
"specialLink": [ "to", "hrefLeft", "hrefRight" ],
"aspects": [ "noHref", "invalidHref", "preferButton" ]
}],
"max-len": ["error", {"code": 180, "ignoreRegExpLiterals": true, "tabWidth": 2}],
"no-console": ["warn"],
"no-underscore-dangle": "off",
"object-curly-newline": ["error", {
"ImportDeclaration": {"multiline": true, "consistent": true, "minProperties": 6}
}],
"react/jsx-filename-extension": ["warn", { "extensions": [".js", ".jsx"] }],
"react/jsx-one-expression-per-line": "off",
"react/destructuring-assignment": "off",
"react/no-danger": "off",
"react-hooks/rules-of-hooks": "error",
"max-classes-per-file": "off",
"react/jsx-curly-spacing": [2, {"when": "never"}],
"object-curly-spacing": ["warn", "always", { "objectsInObjects": true }],
"import/order": ["warn", {
"groups": ["builtin", "external", "internal"],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["react"],
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}]
}
}