UNPKG

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