-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc
74 lines (73 loc) · 2.32 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
{
"extends": "@folio/eslint-config-stripes",
"parser": "@babel/eslint-parser",
"env": {
"jest/globals": true
},
"overrides": [
{
"files": ["**/*.test.js", "test/jest/**/*"],
"rules": {
"max-classes-per-file": "off",
"no-unused-expressions": "off",
"react/prop-types": "off",
"jsx-a11y/control-has-associated-label": "off",
"react/jsx-fragments": "off",
"func-names": "off",
"react/no-multi-comp": "off",
"react/destructuring-assignment": "off",
"react/jsx-key": "off",
"arrow-parens": "off"
}
}, {
"files": ["test/jest/**/*"],
"rules": {
"react/prop-types": "off"
}
}
],
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx"]
}
}
},
"rules": {
"arrow-body-style": "off",
"import/prefer-default-export": "off",
"import/no-useless-path-segments": "off",
"comma-dangle": ["error", "always-multiline"],
"import/no-extraneous-dependencies": "off",
"jsx-quotes": ["error", "prefer-double"],
"no-console": "warn",
"react/forbid-prop-types": "off",
"react/sort-prop-types": ["error"],
"no-unused-vars": ["error", { "ignoreRestSiblings": true }],
"padding-line-between-statements": ["error",
{ "blankLine": "always", "prev": ["const", "let", "var"], "next": "*"},
{ "blankLine": "any", "prev": ["const", "let", "var"], "next": ["const", "let", "var"]}
],
"no-else-return": ["error", { "allowElseIf": false }],
"no-nested-ternary": "error",
"prefer-arrow-callback": "error",
"arrow-parens": [2, "as-needed"],
"multiline-ternary": ["error", "always-multiline"],
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 2 }],
"react/destructuring-assignment": [2, "always"],
"react/function-component-definition": [2, {
"namedComponents": "arrow-function",
}],
"react/hook-use-state": "error",
"react/no-array-index-key": "error",
"react/no-multi-comp": "error",
"react/require-default-props": "error",
"react/jsx-key": "error",
"react/jsx-max-props-per-line": "error",
"object-curly-newline": ["error", {
"ImportDeclaration": { "multiline": true },
"ExportDeclaration": { "multiline": true },
}],
},
"plugins": ["jest"]
}