1 | {
|
2 | "extends": "eslint:recommended",
|
3 | "parserOptions": {
|
4 | "ecmaVersion": 6,
|
5 | },
|
6 | "env": {
|
7 | "node": true,
|
8 | },
|
9 | "rules": {
|
10 | "no-console": 1,
|
11 | "semi": 2,
|
12 | "semi-spacing": 2,
|
13 | "no-extra-semi": 0,
|
14 | "no-new-object": 2,
|
15 | "no-array-constructor": 2,
|
16 | "no-new-symbol": 2,
|
17 | "no-unused-vars": 2,
|
18 | "func-names": 1,
|
19 | "wrap-iife": [2, "any"],
|
20 | "prefer-const": 1,
|
21 | "no-const-assign": 2,
|
22 | "no-class-assign": 2,
|
23 | "no-dupe-class-members": 2,
|
24 | "no-this-before-super": 2,
|
25 | "no-useless-constructor": 2,
|
26 | "one-var": [2, "always"],
|
27 | "one-var-declaration-per-line": 1,
|
28 | "vars-on-top": 1,
|
29 | "brace-style": [1, "1tbs", { "allowSingleLine": true }],
|
30 | "curly": [2, "multi-line"], #this covers all except: if(condition) statement;\n else statement;
|
31 | # "curly": 2, #this covers all but also failse single-line if-statements.
|
32 | "no-nested-ternary": 2,
|
33 | "no-unneeded-ternary": 2,
|
34 | "indent": [2, 2, {"SwitchCase": 1}],
|
35 | "id-length": [2, {"min": 2, "exceptions": ["i", "j", "x", "y", "z"]}],
|
36 | "camelcase": 2,
|
37 | "quotes": [1, "single", "avoid-escape"],
|
38 | "quote-props": [2, "as-needed", { "unnecessary": true }],
|
39 | "template-curly-spacing": 1,
|
40 | "no-underscore-dangle": [2, { "allow": [] }],
|
41 | "new-cap": 2,
|
42 | "new-parens": 2,
|
43 | "no-loop-func": 2,
|
44 | "guard-for-in": 2,
|
45 | # "object-shorthand": [2, "never"],
|
46 | "object-shorthand": [2, "always"],
|
47 | "complexity": [2, 15],
|
48 | "block-scoped-var": 2,
|
49 | "dot-location": [2, "property"],
|
50 | "dot-notation": 2,
|
51 | "eqeqeq": [2, "smart"],
|
52 | "no-caller": 2,
|
53 | "no-case-declarations": 2,
|
54 | "default-case": 2,
|
55 | "consistent-return": 2,
|
56 | "no-else-return": 2,
|
57 | "no-empty-pattern": 1,
|
58 | "no-eval": 2,
|
59 | "no-extend-native": 2,
|
60 | "no-extra-bind": 2,
|
61 | "no-fallthrough": 2,
|
62 | "no-floating-decimal": 1,
|
63 | "no-implicit-coercion": 2,
|
64 | "no-implied-eval": 2,
|
65 | "no-lone-blocks": 2,
|
66 | "no-magic-numbers": [1, {"ignore": [0, 1, -1, 404]}],
|
67 | "no-multi-spaces": 2,
|
68 | "no-irregular-whitespace": 2,
|
69 | "no-multi-str": 2,
|
70 | "no-native-reassign": 2,
|
71 | "no-param-reassign": 2,
|
72 | "no-proto": 2,
|
73 | "no-redeclare": 2,
|
74 | "no-return-assign": 2,
|
75 | "no-self-compare": 2,
|
76 | "no-sequences": 2,
|
77 | "no-shadow": 2,
|
78 | "callback-return": 1,
|
79 | "global-require": 0,
|
80 | "handle-callback-err": 2,
|
81 | "no-path-concat": 2,
|
82 | "no-process-exit": 2,
|
83 | "no-new-require": 2,
|
84 | "no-confusing-arrow": 2,
|
85 | "arrow-spacing": 1,
|
86 | "require-yield": 2,
|
87 | "yield-star-spacing": 2,
|
88 | "no-continue": 2,
|
89 |
|
90 | "block-spacing": 2,
|
91 | "array-bracket-spacing": [2, "always", {
|
92 | "objectsInArrays": false,
|
93 | "arraysInArrays": false
|
94 | }],
|
95 | "object-curly-spacing": [2, "always", {
|
96 | "objectsInObjects": false,
|
97 | "arraysInObjects": false
|
98 | }],
|
99 | "comma-spacing": 2,
|
100 | "comma-style": [2, "first", {exceptions: {ObjectExpression: true, ArrayExpression: true}}],
|
101 | "computed-property-spacing": 2,
|
102 | "consistent-this": [2, "self"],
|
103 | "key-spacing": 2,
|
104 | "keyword-spacing": 2,
|
105 | "linebreak-style": [2, "unix"],
|
106 | "no-inline-comments": 2,
|
107 | "max-len": [1, 120],
|
108 | "max-depth": [1, 5],
|
109 | "max-nested-callbacks": [2, 4],
|
110 | "max-params": [2,5],
|
111 | "max-statements": [2, 50],
|
112 | "no-bitwise": 2,
|
113 | "no-lonely-if": 1,
|
114 | "no-multiple-empty-lines": [1, {"max": 1}],
|
115 | "no-spaced-func": 1,
|
116 | "no-trailing-spaces": 2,
|
117 | "no-whitespace-before-property": 2,
|
118 | "padded-blocks": [1, "never"],
|
119 | "space-before-blocks": 2,
|
120 | "space-before-function-paren": [1, "never"],
|
121 | "space-in-parens": 1,
|
122 | "space-infix-ops": 2,
|
123 | "space-unary-ops": 2,
|
124 | "wrap-regex": 2,
|
125 | "operator-linebreak": [1, "before"],
|
126 | }
|
127 | }
|