-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.eslintrc
100 lines (97 loc) · 3.13 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
// ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does.
// From here, enable the rules that you care about by changing the 0 to a 1 or 2.
// 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
// See: https://gist.github.com/ghostwords/40936f11091b87987e56
// See: http://eslint.org/docs/rules/
// See: https://github.com/feross/eslint-config-standard
{
"plugins": [
"compat", // Allow configuration of target browser/s (npm i -D eslint-plugin-compat)
"import"
//"react" // React specific linting rules (npm i -D eslint-plugin-react)
//"flowtype" // Will not use flow. See: https://github.com/facebook/flow/issues/869#issuecomment-256643823
],
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module",
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"globalReturn": true,
"jsx": true,
"modules": true
}
},
"env": {
"browser": true, // browser global variables
"node": true, // Node.js global variables and Node.js-specific rules
"mocha": true, // adds all of the Mocha testing global variables
"es6": true // ECMAScript 6
},
"extends": [
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings"
//"plugin:react/recommended"
//"plugin:flowtype/recommended" // Will not use flow. See: https://github.com/facebook/flow/issues/869#issuecomment-256643823
],
"parser": "babel-eslint",
"settings": {
"ecmascript": 2017,
"jsx": true,
"polyfills": [
"fetch", "promises"
]
},
"globals": {
// "componentHandler": true // Material Design Lite
"browser": true
},
"rules": {
"arrow-parens": ["error", "always"],
"brace-style": 0,
"comma-dangle": 0,
"compat/compat": "error", // required by eslint-plugin-compat
"import/no-extraneous-dependencies": 0,
"import/prefer-default-export": 0,
"indent": [
2, 2, {
"SwitchCase": 1,
"VariableDeclarator": 2,
"ignoredNodes": [
"JSXElement",
"JSXElement > *",
"JSXOpeningElement",
"JSXClosingElement",
"JSXAttribute",
"JSXIdentifier",
"JSXNamespacedName",
"JSXMemberExpression",
"JSXSpreadAttribute",
"JSXExpressionContainer",
"JSXText",
"JSXEmptyExpression",
"JSXSpreadChild"
]
}
],
"linebreak-style": 0,
"max-len": ["error", {"code": 120, "ignoreUrls": true, "ignoreComments": true}],
"max-statements-per-line": [1, {"max": 1}],
"no-console": 1,
"no-multi-spaces": ["error", {"ignoreEOLComments": true}],
"no-restricted-syntax": 1,
"no-iterator": 1,
"no-underscore-dangle": 0,
"no-unused-vars": ["error", {"varsIgnorePattern": "h"}],
"no-var": 1,
"object-curly-newline": ["error", {"consistent": true}],
"object-curly-spacing": ["error", "never"],
"prefer-const": 1,
"prefer-rest-params": 1,
"prefer-spread": 1,
"prefer-template": 1,
"quotes": [2, "single"],
"semi": [2, "always"],
"strict": 0
}
}