This repository has been archived by the owner on Sep 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
.eslintrc
executable file
·52 lines (49 loc) · 1.62 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
{
"parser": "babel-eslint",
"plugins": [
"babel",
"@twist/core"
],
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@twist/core/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"rules": {
// Formatting (spacing)
"indent": [ "error", 4 ],
"operator-linebreak": [ 1, "before" ],
"brace-style": [ "error", "stroustrup", { "allowSingleLine": false } ],
"arrow-spacing": "error",
"generator-star-spacing": "error",
"object-curly-spacing": [ "error", "always" ],
"array-bracket-spacing": [ "error", "always" ],
"semi-spacing": [ "error", { "before": false, "after": true } ],
"space-before-blocks": "error",
"space-before-function-paren": [ "error", "never" ],
"space-in-parens": [ "error", "never" ],
"space-infix-ops": "error",
"space-unary-ops": [ "error", { "words": true, "nonwords": false } ],
// Formatting (syntax)
"quotes": [ "error", "single", { "avoidEscape": true, "allowTemplateLiterals": true } ],
"object-shorthand": "error",
"semi": [ "error", "always" ],
"curly": "error",
// Semantic rules
"eqeqeq": "error",
"new-cap": [ "error", { "capIsNew": false } ],
// Code cleanliness
"no-console": [ "error", { "allow": ["warn", "error"] } ] // Just prevent console.log
}
}