forked from march08/animated-burgers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
76 lines (75 loc) · 1.87 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
// aliases
const softenedPackageAndAliasRules = {
ignore: [
"components",
"helpers",
"lib",
"ls",
"pages",
"rdx",
"config",
"misc"
]
};
module.exports = {
globals: {
System: true
},
root: true,
extends: "airbnb",
parser: "babel-eslint",
parserOptions: {
ecmaVersion: 7,
ecmaFeatures: {
jsx: true,
modules: true,
experimentalObjectRestSpread: true,
experimentalDecorators: true
},
sourceType: "module"
},
env: {
browser: true,
node: true,
es6: true,
jest: true
},
plugins: ["react", "flowtype"],
rules: {
semi: ["error", "never"],
"react/jsx-one-expression-per-line": false,
"array-element-newline": ["error", "always"],
"react/require-default-props": 1,
"max-len": ["error", 110],
"flowtype/require-valid-file-annotation": [0, "never"],
"jsx-a11y/anchor-is-valid": 0, // fails at using <Link to=...
"jsx-a11y/label-has-for": 0, // fails, react uses htmlFor
"jsx-a11y/click-events-have-key-events": 0,
"import/no-unresolved": ["error", softenedPackageAndAliasRules],
"import/extensions": ["error", softenedPackageAndAliasRules],
"import/prefer-default-export": 0,
"react/prefer-stateless-function": 0,
"react/jsx-indent": [2, 2],
"react/jsx-filename-extension": 0,
"react/require-default-props": 1,
"react/jsx-max-props-per-line": [1, { maximum: 1 }],
"react/jsx-sort-props": 1,
"react/jsx-curly-spacing": ["error", { when: "always" }],
"import/extensions": [
"error",
"never",
{ ignorePackages: true, Record: "never" }
],
camelcase: 0
},
overrides: [
{
files: ["**/*.test.js", "**/*.test.jsx", "**/__test__/*"],
rules: {
// testing local storage
// https://www.npmjs.com/package/jest-localstorage-mock
"no-underscore-dangle": 0
}
}
]
};