1 | {
|
2 | "env": {
|
3 | "jasmine": true,
|
4 | "node": true
|
5 | },
|
6 |
|
7 | "rules": {
|
8 | // Possible errors
|
9 | "no-comma-dangle": 2,
|
10 | "no-cond-assign": 2,
|
11 | "no-console": 0,
|
12 | "no-constant-condition": 0,
|
13 | "no-control-regex": 2,
|
14 | "no-debugger": 2,
|
15 | "no-dupe-keys": 2,
|
16 | "no-empty": 2,
|
17 | "no-empty-class": 2,
|
18 | "no-ex-assign": 2,
|
19 | "no-extra-boolean-cast": 2,
|
20 | "no-extra-parens": 0,
|
21 | "no-extra-semi": 2,
|
22 | "no-func-assign": 2,
|
23 | "no-inner-declarations": [2, "functions"],
|
24 | "no-invalid-regexp": 2,
|
25 | "no-irregular-whitespace": 2,
|
26 | "no-negated-in-lhs": 2,
|
27 | "no-obj-calls": 2,
|
28 | "no-regex-spaces": 2,
|
29 | "no-reserved-keys": 0,
|
30 | "no-sparse-arrays": 2,
|
31 | "no-unreachable": 2,
|
32 | "use-isnan": 2,
|
33 | "valid-jsdoc": 0, // TODO: enable with { "requireReturn": false }
|
34 | "valid-typeof": 2,
|
35 |
|
36 | // Best practices
|
37 | "block-scoped-var": 0,
|
38 | "complexity": 0, // TODO: enable
|
39 | "consistent-return": 2,
|
40 | "curly": [2, "all"],
|
41 | "default-case": 2,
|
42 | "dot-notation": 2,
|
43 | "eqeqeq": [2, "smart"],
|
44 | "guard-for-in": 2,
|
45 | "no-alert": 2,
|
46 | "no-caller": 2,
|
47 | "no-div-regex": 2,
|
48 | "no-else-return": 0,
|
49 | "no-empty-label": 2,
|
50 | "no-eq-null": 2,
|
51 | "no-eval": 2,
|
52 | "no-extra-bind": 2,
|
53 | "no-extend-native": 2,
|
54 | "no-fallthrough": 2,
|
55 | "no-floating-decimal": 2,
|
56 | "no-implied-eval": 2,
|
57 | "no-iterator": 2,
|
58 | "no-labels": 2,
|
59 | "no-lone-blocks": 2,
|
60 | "no-loop-func": 2,
|
61 | "no-multi-spaces": 2,
|
62 | "no-multi-str": 2,
|
63 | "no-native-reassign": 2,
|
64 | "no-new": 2,
|
65 | "no-new-func": 2,
|
66 | "no-new-wrappers": 2,
|
67 | "no-octal": 2,
|
68 | "no-octal-escape": 2,
|
69 | "no-process-env": 2,
|
70 | "no-proto": 2,
|
71 | "no-redeclare": 2,
|
72 | "no-return-assign": 2,
|
73 | "no-script-url": 2,
|
74 | "no-self-compare": 2,
|
75 | "no-sequences": 2,
|
76 | "no-unused-expressions": 2,
|
77 | "no-void": 2,
|
78 | "no-warning-comments": 0,
|
79 | "no-with": 2,
|
80 | "radix": 2,
|
81 | "vars-on-top": 0,
|
82 | "wrap-iife": [2, "inside"],
|
83 | "yoda": 2,
|
84 |
|
85 | // Strict mode
|
86 | "global-strict": 0,
|
87 | "no-extra-strict": 2,
|
88 | "strict": 2,
|
89 |
|
90 | // Variables
|
91 | "no-catch-shadow": 0,
|
92 | "no-delete-var": 2,
|
93 | "no-label-var": 2,
|
94 | "no-shadow": 2,
|
95 | "no-shadow-restricted-names": 2,
|
96 | "no-undef": 2,
|
97 | "no-undef-init": 2,
|
98 | "no-undefined": 0,
|
99 | "no-unused-vars": 0,
|
100 | "no-use-before-define": 2,
|
101 |
|
102 | // Node.js
|
103 | "handle-callback-err": 2,
|
104 | "no-mixed-requires": 2,
|
105 | "no-new-require": 2,
|
106 | "no-path-concat": 2,
|
107 | "no-process-exit": 2,
|
108 | "no-restricted-modules": 0,
|
109 | "no-sync": 0,
|
110 |
|
111 | // Stylistic issues
|
112 | "brace-style": 0, // TODO: enable with "stroustrup" (or "1tbsp" + lots of cleanup)
|
113 | "camelcase": 2,
|
114 | "comma-spacing": [2, {
|
115 | "before": false,
|
116 | "after": true
|
117 | }],
|
118 | "comma-style": [2, "last"],
|
119 | "consistent-this": [2, "self"],
|
120 | "eol-last": 2,
|
121 | "func-names": 0,
|
122 | "func-style": 0,
|
123 | "key-spacing": [2, {
|
124 | "beforeColon": false,
|
125 | "afterColon": true
|
126 | }],
|
127 | "max-nested-callbacks": 0,
|
128 | "new-cap": 2,
|
129 | "new-parens": 2,
|
130 | "no-array-constructor": 2,
|
131 | "no-lonely-if": 2,
|
132 | "no-mixed-spaces-and-tabs": 2,
|
133 | "no-multiple-empty-lines": [2, {
|
134 | "max": 2
|
135 | }],
|
136 | "no-nested-ternary": 2,
|
137 | "no-new-object": 2,
|
138 | "no-space-before-semi": 2,
|
139 | "no-spaced-func": 2,
|
140 | "no-ternary": 0,
|
141 | "no-trailing-spaces": 2,
|
142 | "no-underscore-dangle": 0,
|
143 | "no-wrap-func": 2,
|
144 | "one-var": 0,
|
145 | "padded-blocks": [2, "never"],
|
146 | "quotes": [2, "single", "avoid-escape"],
|
147 | "quote-props": 0,
|
148 | "semi": [2, "always"],
|
149 | "sort-vars": 0,
|
150 | "space-after-keywords": [2, "always"],
|
151 | "space-before-blocks": [2, "always"],
|
152 | "space-in-brackets": 0, // TODO: enable?
|
153 | "space-in-parens": 0, // TODO: enable?
|
154 | "space-infix-ops": 2,
|
155 | "space-return-throw-case": 2,
|
156 | "space-unary-ops": 2,
|
157 | "spaced-line-comment": [2, "always"],
|
158 | "wrap-regex": 0,
|
159 |
|
160 | // Legacy
|
161 | // TODO: consider enabling some of the `max-*` rules
|
162 | "max-depth": 0,
|
163 | "max-len": 0,
|
164 | "max-params": 0,
|
165 | "max-statements": 0,
|
166 | "no-bitwise": 2,
|
167 | "no-plusplus": 0
|
168 | }
|
169 | }
|