-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
93 lines (92 loc) · 2.53 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
{
"root": true,
"parser": "babel-eslint",
"extends": [
"airbnb-base",
"prettier"
],
"plugins": [
"prettier"
],
"env": {
"browser": true,
"es6": true,
"jest": true
},
"rules": {
"new-cap": "off",
"comma-dangle": [
"error",
"always-multiline"
],
"no-multiple-empty-lines": [
"error",
{
"max": 1
}
],
"radix": "off",
// Reports as error files marked as invalid by prettier
"prettier/prettier": [
"error"
],
// Bad for readability, use destructuring when useful
"prefer-destructuring": 0,
// conflicts with curly-spacing rule
"object-curly-newline": 0,
// We have comment blocks describing arguments and we need to keep it.
"function-paren-newline": 0,
// We use the 'import' plugin which allows for cases "flow" awareness.
"no-duplicate-imports": 0,
// We use global requires in various places, e.g. code splitting instances.
"global-require": 0,
// Remove requirement to set extensions in imports
"import/extensions": "off",
// Allow non-default exports.
"import/prefer-default-export": 0,
// Importing libs no in "dependencies" triggers and error, unless test files.
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/*.test.js",
"**/*.spec.js"
]
}
],
// Allow multispace only for alignment of imports, variables declaration and properties.
"no-multi-spaces": [
"error"
],
// Allow larger lines to 120 chars.
"max-len": [
"error",
140,
2,
{
"ignoreUrls": true,
"ignoreComments": false,
"ignoreRegExpLiterals": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}
],
// Enforces one or more spaces before or after colons in object literals.
"key-spacing": [
"error",
{
"mode": "minimum"
}
]
},
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"modules": true,
"jsx": true
},
},
"globals": {
"window": true
}
}