1 | ;
|
2 |
|
3 | module.exports = {
|
4 | rules: {
|
5 | // treat var statements as though they were block scoped
|
6 | "block-scoped-var": 2,
|
7 |
|
8 | // specify curly brace conventions for all control statements
|
9 | curly: [2, "all"],
|
10 |
|
11 | // recommend default case in switch statements
|
12 | "default-case": 1,
|
13 |
|
14 | // encourages the use of dot notation where possible
|
15 | "dot-notation": [2, { allowKeywords: true }],
|
16 |
|
17 | // require the use of === and !==
|
18 | eqeqeq: [2, "allow-null"],
|
19 |
|
20 | // make sure for-in loops have an if statement
|
21 | "guard-for-in": 2,
|
22 |
|
23 | // disallow the use of arguments.caller or .callee
|
24 | "no-caller": 2,
|
25 |
|
26 | // disallow lexical declarations in case/default clauses
|
27 | "no-case-declarations": 1,
|
28 |
|
29 | // disallow else after a return in an if
|
30 | "no-else-return": 2,
|
31 |
|
32 | // disalow empty destructuring patterns
|
33 | "no-empty-pattern": 2,
|
34 |
|
35 | // disallow use of eval()
|
36 | "no-eval": 2,
|
37 |
|
38 | // disallow unneccssary function binding
|
39 | "no-extra-bind": 2,
|
40 |
|
41 | // disallow fallthrough of case statements
|
42 | "no-fallthrough": 2,
|
43 |
|
44 | // disallow the use of leading or trailing decimal points in numeric literals
|
45 | "no-floating-decimal": 2,
|
46 |
|
47 | // disallow the use of eval()-like methods
|
48 | "no-implied-eval": 2,
|
49 |
|
50 | // disallow use of __iterator__ property
|
51 | "no-iterator": 2,
|
52 |
|
53 | // disallow unnecessary nested blocks
|
54 | "no-lone-blocks": 2,
|
55 |
|
56 | // disallow creation of functions within loops
|
57 | "no-loop-func": 2,
|
58 |
|
59 | // disallow use of multiple spaces
|
60 | "no-multi-spaces": 2,
|
61 |
|
62 | // disallow multiline strings without \n
|
63 | "no-multi-str": 2,
|
64 |
|
65 | // disallow reassignments of native objects
|
66 | "no-native-reassign": 2,
|
67 |
|
68 | // disallow the use of the new operator when not part of the assignment or comparison
|
69 | "no-new": 2,
|
70 |
|
71 | // disallow the use of old style octal literals
|
72 | "no-octal": 2,
|
73 |
|
74 | // disallow use of octal escape sequences in string literals
|
75 | "no-octal-escape": 2,
|
76 |
|
77 | // disallow usage of __proto__ property
|
78 | "no-proto": 2,
|
79 |
|
80 | // disallow declaring the same variable more than once
|
81 | "no-redeclare": 2,
|
82 |
|
83 | // disallow use of assignment in return statements
|
84 | "no-return-assign": 2,
|
85 |
|
86 | // disallow use of `javascript:` urls`
|
87 | "no-script-url": 2,
|
88 |
|
89 | // disallow comparisons where both sides are exactly the same
|
90 | "no-self-compare": 2,
|
91 |
|
92 | // disallow use of comma operator
|
93 | "no-sequences": 2,
|
94 |
|
95 | // disallow unnecessary string escaping
|
96 | "no-useless-escape": 2,
|
97 |
|
98 | // disallow use of the with statement
|
99 | "no-with": 2,
|
100 |
|
101 | // require the use of the second argument for parseInt()
|
102 | radix: 2,
|
103 |
|
104 | // require immediate function invocation to be wrapped in parentheses
|
105 | "wrap-iife": [2, "inside"],
|
106 |
|
107 | // disallow Yoda conditions
|
108 | yoda: 2,
|
109 | },
|
110 | };
|