UNPKG

2.43 kBJavaScriptView Raw
1module.exports = {
2 'rules': {
3 // disallow trailing commas in object literals
4 'comma-dangle': [2, 'always-multiline'],
5 // disallow assignment in conditional expressions
6 'no-cond-assign': [2, 'always'],
7 // disallow use of console
8 'no-console': 1,
9 // disallow use of constant expressions in conditions
10 'no-constant-condition': 1,
11 // disallow control characters in regular expressions
12 'no-control-regex': 2,
13 // disallow use of debugger
14 'no-debugger': 1,
15 // disallow duplicate arguments in functions
16 'no-dupe-args': 2,
17 // disallow duplicate keys when creating object literals
18 'no-dupe-keys': 2,
19 // disallow a duplicate case label.
20 'no-duplicate-case': 2,
21 // disallow the use of empty character classes in regular expressions
22 'no-empty-character-class': 2,
23 // disallow empty statements
24 'no-empty': 2,
25 // disallow assigning to the exception in a catch block
26 'no-ex-assign': 2,
27 // disallow double-negation boolean casts in a boolean context
28 'no-extra-boolean-cast': 0,
29 // disallow unnecessary parentheses
30 'no-extra-parens': [2, 'functions'],
31 // disallow unnecessary semicolons
32 'no-extra-semi': 2,
33 // disallow overwriting functions written as function declarations
34 'no-func-assign': 2,
35 // disallow function or variable declarations in nested blocks
36 'no-inner-declarations': 2,
37 // disallow invalid regular expression strings in the RegExp constructor
38 'no-invalid-regexp': 2,
39 // disallow irregular whitespace outside of strings and comments
40 'no-irregular-whitespace': 2,
41 // disallow negation of the left operand of an in expression
42 'no-negated-in-lhs': 2,
43 // disallow the use of object properties of the global object (Math and JSON) as functions
44 'no-obj-calls': 2,
45 // disallow multiple spaces in a regular expression literal
46 'no-regex-spaces': 2,
47 // disallow sparse arrays
48 'no-sparse-arrays': 2,
49 // disallow unreachable statements after a return, throw, continue, or break statement
50 'no-unreachable': 2,
51 // disallow comparisons with the value NaN
52 'use-isnan': 2,
53 // ensure JSDoc comments are valid
54 'valid-jsdoc': 0,
55 // ensure that the results of typeof are compared against a valid string
56 'valid-typeof': 2,
57 // Avoid code that looks like two expressions but is actually one
58 'no-unexpected-multiline': 0
59 }
60};