1 | {
|
2 | // eslint: recommended automatically enables most/all rules from the
|
3 | // possible errors section and more:
|
4 | // http://eslint.org/docs/rules/#possible-errors
|
5 | "extends": "eslint:recommended",
|
6 | "plugins": [
|
7 | "@lrowe/flow-remove-types"
|
8 | ],
|
9 | "env": {
|
10 | "browser": false,
|
11 | "node": true,
|
12 | "es6": true
|
13 | },
|
14 | "rules": {
|
15 | // possible errors
|
16 | "no-cond-assign": [ 2 ],
|
17 | "no-constant-condition": [ 2 ],
|
18 | "no-control-regex": [ 2 ],
|
19 | "no-debugger": [ 2 ],
|
20 | "no-dupe-args": [ 2 ],
|
21 | "no-dupe-keys": [ 2 ],
|
22 | "no-duplicate-case": [ 2 ],
|
23 | "no-empty": [ 2 ],
|
24 | "no-empty-character-class": [ 2 ],
|
25 | "no-ex-assign": [ 2 ],
|
26 | "no-extra-boolean-cast": [ 2 ],
|
27 | "no-extra-semi": [ 2 ],
|
28 | "no-func-assign": [ 2 ],
|
29 | // this is for variable hoisting, not necessary if we use block scoped declarations
|
30 | // "no-inner-declarations": [ 2, "both" ],
|
31 | "no-invalid-regexp": [ 2 ],
|
32 | "no-irregular-whitespace": [ 2 ],
|
33 | "no-negated-in-lhs": [ 2 ],
|
34 | "no-reserved-keys": [ 0 ],
|
35 | "no-regex-spaces": [ 2 ],
|
36 | "no-sparse-arrays": [ 2 ],
|
37 | "no-unreachable": [ 2 ],
|
38 | "use-isnan": [ 2 ],
|
39 | "valid-typeof": [ 2 ],
|
40 | "valid-jsdoc": [ 2, {
|
41 | "requireReturnDescription": false
|
42 | }],
|
43 |
|
44 | // best practices
|
45 | "array-callback-return": [ 2 ],
|
46 | "block-scoped-var": [ 2 ],
|
47 | "complexity": [ 1 ],
|
48 | "consistent-return": [ 2 ],
|
49 | "curly": [ 2 ],
|
50 | "default-case": [ 2 ],
|
51 | "dot-notation": [ 2, { "allowKeywords": true } ],
|
52 | "eqeqeq": [ 2 ],
|
53 | "guard-for-in": [ 2 ],
|
54 | "no-alert": [ 2 ],
|
55 | "no-caller": [ 2 ],
|
56 | "no-case-declarations": [ 2 ],
|
57 | "no-div-regex": [ 2 ],
|
58 | "no-empty-function": [ 2 ],
|
59 | "no-empty-pattern": [ 2 ],
|
60 | "no-eq-null": [ 2 ],
|
61 | "no-eval": [ 2 ],
|
62 | "no-extend-native": [ 2 ],
|
63 | "no-extra-bind": [ 2 ],
|
64 | "no-extra-label": [ 2 ],
|
65 | "no-fallthrough": [ 2 ],
|
66 | "no-floating-decimal": [ 2 ],
|
67 | "no-implicit-coercion": [ 2 ],
|
68 | "no-implied-eval": [ 2 ],
|
69 | "no-iterator": [ 2 ],
|
70 | "no-labels": [ 2 ],
|
71 | "no-lone-blocks": [ 2 ],
|
72 | "no-loop-func": [ 2 ],
|
73 | "no-magic-numbers": [ 0 ],
|
74 | "no-multi-spaces": [ 0 ],
|
75 | "no-native-reassign": [ 2 ],
|
76 | "no-new": [ 2 ],
|
77 | "no-new-func": [ 2 ],
|
78 | "no-new-wrappers": [ 2 ],
|
79 | "no-octal": [ 2 ],
|
80 | "no-octal-escape": [ 2 ],
|
81 | "no-param-reassign": [ 2 ],
|
82 | "no-proto": [ 2 ],
|
83 | "no-redeclare": [ 2 ],
|
84 | "no-return-assign": [ 2 ],
|
85 | "no-script-url": [ 2 ],
|
86 | "no-self-assign": [ 2 ],
|
87 | "no-self-compare": [ 2 ],
|
88 | "no-sequences": [ 2 ],
|
89 | "no-throw-literal": [ 2 ],
|
90 | "no-unmodified-loop-condition": [ 2 ],
|
91 | "no-unused-expressions": [ 2 ],
|
92 | "no-unused-labels": [ 2 ],
|
93 | "no-useless-call": [ 2 ],
|
94 | "no-useless-concat": [ 2 ],
|
95 | "no-void": [ 2 ],
|
96 | //"no-warning-comments": [ 1 ], // XXX still in development
|
97 | "no-with": [ 2 ],
|
98 | "wrap-iife": [ 2 ],
|
99 | "yoda": [ 2, "never" ],
|
100 |
|
101 | // strict mode
|
102 | "strict": [ 2, "global" ],
|
103 |
|
104 | // variables
|
105 | "no-var": [ 2 ],
|
106 | "no-catch-shadow": [ 2 ],
|
107 | "no-delete-var": [ 2 ],
|
108 | "no-shadow": [ 2 ],
|
109 | "no-shadow-restricted-names": [ 2 ],
|
110 | "no-undef": [ 2 ],
|
111 | "no-undef-init": [ 2 ],
|
112 | // "no-undefined": [ 2 ],
|
113 | "no-unused-vars": [ 2, { "vars": "all", "args": "none" } ],
|
114 | "no-use-before-define": [ 2, "nofunc" ],
|
115 |
|
116 | // node.js
|
117 | "callback-return": [ 2, [ "callback", "cb", "cb1", "cb2", "cb3", "next", "innerCb", "done" ]],
|
118 | "global-require": [ 2 ],
|
119 | "handle-callback-err": [ 2, "^.*(e|E)rr" ],
|
120 | "no-mixed-requires": [ 2 ],
|
121 | "no-new-require": [ 2 ],
|
122 | "no-path-concat": [ 2 ],
|
123 | "no-process-exit": [ 2 ],
|
124 |
|
125 | // stylistic
|
126 | // turn on the few on that aren't handled by JSCS.
|
127 | "consistent-this": [ 2, "self" ],
|
128 | "no-array-constructor": [ 2 ],
|
129 | "no-nested-ternary": [ 2 ],
|
130 | "no-new-object": [ 2 ],
|
131 |
|
132 | // es6
|
133 | "no-class-assign": [ 2 ],
|
134 | "no-dupe-class-members": [ 2 ],
|
135 | "no-new-symbol": [ 2 ],
|
136 | "no-const-assign": [ 2 ]
|
137 | }
|
138 | }
|