Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | 1x | /* eslint-env commonjs */
/* eslint-disable import/unambiguous */
/* eslint-disable import/no-commonjs */
module.exports = {
rules: {
// * We leave most stylistic issues to prettier
// Enforce camelcase naming convention
camelcase: 'error',
// Enforce or disallow capitalization of the first letter of a comment
'capitalized-comments': 'off',
// Enforce consistent naming when capturing the current execution context
'consistent-this': ['error', 'that'],
// Require function names to match the name of the variable or property to which they are assigned
'func-name-matching': 'error',
// Require or disallow named function expressions
'func-names': ['error', 'as-needed'],
// Enforce the consistent use of either function declarations or expressions
'func-style': ['error', 'declaration'],
// Disallow specified identifiers
'id-blacklist': 'off',
// Enforce minimum and maximum identifier lengths
'id-length': 'off',
// Require identifiers to match a specified regular expression
'id-match': 'off',
// Enforce position of line comments
'line-comment-position': 'off',
// Require or disallow an empty line between class members
'lines-between-class-members': 'error',
// Enforce a maximum depth that blocks can be nested
'max-depth': 'off',
// Enforce a maximum number of lines per file
'max-lines': 'off',
// Enforce a maximum number of line of code in a function
'max-lines-per-function': 'off',
// Enforce a maximum depth that callbacks can be nested
'max-nested-callbacks': 'off',
// Enforce a maximum number of parameters in function definitions
'max-params': 'off',
// Enforce a maximum number of statements allowed in function blocks
'max-statements': 'off',
// Enforce a maximum number of statements allowed per line
'max-statements-per-line': 'off',
// Enforce a particular style for multiline comments
'multiline-comment-style': ['error', 'separate-lines'],
// Require constructor names to begin with a capital letter
'new-cap': 'error',
// Disallow Array constructors
'no-array-constructor': 'error',
// Disallow bitwise operators
'no-bitwise': 'error',
// Disallow continue statements
'no-continue': 'error',
// Disallow inline comments after code
'no-inline-comments': 'off',
// Disallow if statements as the only statement in else blocks
'no-lonely-if': 'error',
// Disallow mixed binary operators
'no-mixed-operators': 'error',
// Disallow use of chained assignment expressions
'no-multi-assign': 'error',
// Disallow multiple empty lines
'no-multiple-empty-lines': 'error',
// Disallow negated conditions
'no-negated-condition': 'error',
// Disallow nested ternary expressions
'no-nested-ternary': 'error',
// Disallow Object constructors
'no-new-object': 'error',
// Disallow the unary operators ++ and --
'no-plusplus': 'error',
// Disallow specified syntax
'no-restricted-syntax': 'off',
// Disallow ternary operators
'no-ternary': 'off',
// Disallow dangling underscores in identifiers
'no-underscore-dangle': 'error',
// Disallow ternary operators when simpler alternatives exist
'no-unneeded-ternary': 'error',
// Enforce variables to be declared either together or separately in functions
'one-var': ['error', 'never'],
// Require or disallow assignment operator shorthand where possible
'operator-assignment': 'error',
// Require or disallow padding lines between statements
'padding-line-between-statements': 'off',
// Disallow the use of `Math.pow` in favor of the `**` operator
'prefer-exponentiation-operator': 'error',
// Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead
'prefer-object-spread': 'error',
// Require object keys to be sorted
'sort-keys': ['error', 'asc', { caseSensitive: true, natural: true }],
// Require variables within the same declaration block to be sorted
'sort-vars': 'error',
// Enforce consistent spacing after the // or /* in a comment
'spaced-comment': 'error',
},
}
|