-
-
Notifications
You must be signed in to change notification settings - Fork 149
/
.eslintrc.json
96 lines (96 loc) · 4.34 KB
/
.eslintrc.json
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
{ // https://github.com/Microsoft/vscode-eslint/issues/284
"parser": "@typescript-eslint/parser",
"extends": ["eslint:recommended"],
"plugins": ["react", "fp"],
"env": {
"browser": true,
"es6": true,
"commonjs": true
},
"globals": {
"__dirname": false
},
"parserOptions": {
"jsx": true,
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
// code features
"array-callback-return" : ["error"],
"arrow-parens" : ["error"],
"arrow-spacing" : ["error"],
"curly" : ["error", "multi-or-nest"],
"default-case" : ["error"],
"dot-location" : ["error"],
"eqeqeq" : ["warn"],
"generator-star-spacing" : ["error"],
"no-caller" : ["error"],
"no-console" : ["off"],
"no-div-regex" : ["error"],
"no-else-return" : ["error"],
"no-extend-native" : ["error"],
"no-floating-decimal" : ["error"],
// "no-implicit-coercion" : ["error"],
"no-implicit-globals" : ["error"],
"no-implied-eval" : ["error"],
"no-invalid-this" : ["error"],
"no-labels" : ["error"],
"no-new-wrappers" : ["error"],
"no-proto" : ["error"],
"no-return-assign" : ["error"],
"no-return-await" : ["error"],
"no-self-compare" : ["error"],
"no-sequences" : ["error"],
"no-unmodified-loop-condition": ["warn"],
"no-undef" : ["off"],
"no-unused-vars" : ["off"],
"no-useless-call" : ["error"],
"no-useless-catch" : ["error"],
"no-useless-concat" : ["error"],
"no-useless-return" : ["error"],
"no-var" : ["error"],
"no-with" : ["error"],
// "object-shorthand" : ["warn"],
"prefer-arrow-callback" : ["error"],
"prefer-rest-params" : ["error"],
"prefer-spread" : ["error"],
"prefer-template" : ["error"],
"require-await" : ["warn"],
"require-unicode-regexp" : ["error"],
"rest-spread-spacing" : ["error"],
"symbol-description" : ["error"],
"template-curly-spacing" : ["error"],
"yield-star-spacing" : ["error", "before"],
"yoda" : ["error"],
// code style
"array-bracket-newline" : ["error", "consistent"],
"array-bracket-spacing" : ["error"],
"block-spacing" : ["error", "never"],
"brace-style" : ["error", "1tbs", {"allowSingleLine": true}],
"comma-dangle" : ["error", "always-multiline"],
"comma-spacing" : ["error", {"before": false, "after": true}],
"computed-property-spacing" : ["error"],
"eol-last" : ["error"],
"func-call-spacing" : ["error"],
"indent" : ["error", 4, {"MemberExpression": 0}],
"key-spacing" : ["error", {"align": "colon"}],
"keyword-spacing" : ["error"],
"linebreak-style" : ["error"],
"new-cap" : ["error", {"capIsNew": false}],
"no-array-constructor" : ["error"],
"no-multi-assign" : ["error"],
"no-nested-ternary" : ["error"],
"no-whitespace-before-property": ["error"],
"object-curly-newline" : ["error"],
"object-curly-spacing" : ["error"],
"prefer-object-spread" : ["error"],
"quotes" : ["error", "single"],
"semi" : ["error", "never"],
"no-trailing-spaces" : ["error"]
// "multiline-comment-style" : ["error", "starred-block"]
}
}