|
| 1 | +module.exports = { |
| 2 | + 'rules': { |
| 3 | + // Enforces getter/setter pairs in objects |
| 4 | + 'accessor-pairs': 0, |
| 5 | + // treat var statements as if they were block scoped |
| 6 | + 'block-scoped-var': 2, |
| 7 | + // specify the maximum cyclomatic complexity allowed in a program |
| 8 | + 'complexity': [0, 11], |
| 9 | + // require return statements to either always or never specify values |
| 10 | + 'consistent-return': 2, |
| 11 | + // specify curly brace conventions for all control statements |
| 12 | + 'curly': [2, 'multi-line'], |
| 13 | + // require default case in switch statements |
| 14 | + 'default-case': 2, |
| 15 | + // encourages use of dot notation whenever possible |
| 16 | + 'dot-notation': [2, { 'allowKeywords': true }], |
| 17 | + // enforces consistent newlines before or after dots |
| 18 | + 'dot-location': 0, |
| 19 | + // require the use of === and !== |
| 20 | + 'eqeqeq': 2, |
| 21 | + // make sure for-in loops have an if statement |
| 22 | + 'guard-for-in': 2, |
| 23 | + // disallow the use of alert, confirm, and prompt |
| 24 | + 'no-alert': 1, |
| 25 | + // disallow use of arguments.caller or arguments.callee |
| 26 | + 'no-caller': 2, |
| 27 | + // disallow lexical declarations in case clauses |
| 28 | + 'no-case-declarations': 2, |
| 29 | + // disallow division operators explicitly at beginning of regular expression |
| 30 | + 'no-div-regex': 0, |
| 31 | + // disallow else after a return in an if |
| 32 | + 'no-else-return': 2, |
| 33 | + // disallow empty destructuring patterns |
| 34 | + 'no-empty-pattern': 2, |
| 35 | + // disallow comparisons to null without a type-checking operator |
| 36 | + 'no-eq-null': 0, |
| 37 | + // disallow use of eval() |
| 38 | + 'no-eval': 2, |
| 39 | + // disallow adding to native types |
| 40 | + 'no-extend-native': 2, |
| 41 | + // disallow unnecessary function binding |
| 42 | + 'no-extra-bind': 2, |
| 43 | + // disallow fallthrough of case statements |
| 44 | + 'no-fallthrough': 2, |
| 45 | + // disallow the use of leading or trailing decimal points in numeric literals |
| 46 | + 'no-floating-decimal': 2, |
| 47 | + // disallow the type conversions with shorter notations |
| 48 | + 'no-implicit-coercion': 0, |
| 49 | + // disallow use of eval()-like methods |
| 50 | + 'no-implied-eval': 2, |
| 51 | + // disallow this keywords outside of classes or class-like objects |
| 52 | + 'no-invalid-this': 0, |
| 53 | + // disallow usage of __iterator__ property |
| 54 | + 'no-iterator': 2, |
| 55 | + // disallow use of labeled statements |
| 56 | + 'no-labels': 2, |
| 57 | + // disallow unnecessary nested blocks |
| 58 | + 'no-lone-blocks': 2, |
| 59 | + // disallow creation of functions within loops |
| 60 | + 'no-loop-func': 2, |
| 61 | + // disallow use of multiple spaces |
| 62 | + 'no-multi-spaces': 2, |
| 63 | + // disallow use of multiline strings |
| 64 | + 'no-multi-str': 2, |
| 65 | + // disallow reassignments of native objects |
| 66 | + 'no-native-reassign': 2, |
| 67 | + // disallow use of new operator when not part of the assignment or comparison |
| 68 | + 'no-new': 2, |
| 69 | + // disallow use of new operator for Function object |
| 70 | + 'no-new-func': 2, |
| 71 | + // disallows creating new instances of String,Number, and Boolean |
| 72 | + 'no-new-wrappers': 2, |
| 73 | + // disallow use of (old style) octal literals |
| 74 | + 'no-octal': 2, |
| 75 | + // disallow use of octal escape sequences in string literals, such as |
| 76 | + // var foo = 'Copyright \251'; |
| 77 | + 'no-octal-escape': 2, |
| 78 | + // disallow reassignment of function parameters |
| 79 | + 'no-param-reassign': 2, |
| 80 | + // disallow use of process.env |
| 81 | + 'no-process-env': 0, |
| 82 | + // disallow usage of __proto__ property |
| 83 | + 'no-proto': 2, |
| 84 | + // disallow declaring the same variable more then once |
| 85 | + 'no-redeclare': 2, |
| 86 | + // disallow use of assignment in return statement |
| 87 | + 'no-return-assign': 2, |
| 88 | + // disallow use of `javascript:` urls. |
| 89 | + 'no-script-url': 2, |
| 90 | + // disallow assignments where both sides are exactly the same |
| 91 | + 'no-self-assign': 2, |
| 92 | + // disallow comparisons where both sides are exactly the same |
| 93 | + 'no-self-compare': 2, |
| 94 | + // disallow use of comma operator |
| 95 | + 'no-sequences': 2, |
| 96 | + // restrict what can be thrown as an exception |
| 97 | + 'no-throw-literal': 2, |
| 98 | + // disallow usage of expressions in statement position |
| 99 | + 'no-unused-expressions': 2, |
| 100 | + // disallow unused labels |
| 101 | + 'no-unused-labels': 2, |
| 102 | + // disallow unnecessary .call() and .apply() |
| 103 | + 'no-useless-call': 0, |
| 104 | + // disallow use of void operator |
| 105 | + 'no-void': 0, |
| 106 | + // disallow usage of configurable warning terms in comments: e.g. todo |
| 107 | + 'no-warning-comments': [0, { 'terms': ['todo', 'fixme', 'xxx'], 'location': 'start' }], |
| 108 | + // disallow use of the with statement |
| 109 | + 'no-with': 2, |
| 110 | + // require use of the second argument for parseInt() |
| 111 | + 'radix': 2, |
| 112 | + // requires to declare all vars on top of their containing scope |
| 113 | + 'vars-on-top': 2, |
| 114 | + // require immediate function invocation to be wrapped in parentheses |
| 115 | + 'wrap-iife': [2, 'any'], |
| 116 | + // require or disallow Yoda conditions |
| 117 | + 'yoda': 2 |
| 118 | + } |
| 119 | +}; |
0 commit comments