more config
This commit is contained in:
parent
be612e8aaf
commit
0586e0c7b8
60
index.js
60
index.js
@ -166,10 +166,10 @@ module.exports = {
|
|||||||
'always',
|
'always',
|
||||||
{ exceptAftersingleLine: true }
|
{ exceptAftersingleLine: true }
|
||||||
],
|
],
|
||||||
'max-depth': ['warn', 4],
|
'max-depth': ['error', 4],
|
||||||
'max-len': ['warn', { code: 80, tabWidth: 4 }],
|
'max-len': ['error', { code: 80, tabWidth: 4 }],
|
||||||
'max-lines': [
|
'max-lines': [
|
||||||
'warn',
|
'error',
|
||||||
{
|
{
|
||||||
max: 300,
|
max: 300,
|
||||||
skipBlankLines: true,
|
skipBlankLines: true,
|
||||||
@ -177,43 +177,39 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
'max-lines-per-function': [
|
'max-lines-per-function': [
|
||||||
'warn',
|
'error',
|
||||||
{
|
{
|
||||||
max: 50,
|
max: 50,
|
||||||
skipBlankLines: true,
|
skipBlankLines: true,
|
||||||
skipComments: true,
|
skipComments: true,
|
||||||
IIFEs: true
|
IIFEs: true
|
||||||
}],
|
}],
|
||||||
'max-nested-callbacks': null, // https://eslint.org/docs/rules/max-nested-callbacks // enforce a maximum depth that callbacks can be nested
|
'max-nested-callbacks': ['error', 3],
|
||||||
'max-params': null, // https://eslint.org/docs/rules/max-params // enforce a maximum number of parameters in function definitions
|
'max-params': ['error', 3],
|
||||||
'max-statements': null, // https://eslint.org/docs/rules/max-statements // enforce a maximum number of statements allowed in function blocks
|
'max-statements': ['error', 20],
|
||||||
'max-statements-per-line': null, // https://eslint.org/docs/rules/max-statements-per-line // enforce a maximum number of statements allowed per line
|
'max-statements-per-line': 'error',
|
||||||
'multiline-comment-style': null, // https://eslint.org/docs/rules/multiline-comment-style // enforce a particular style for multiline comments
|
'multiline-comment-style': ['error', 'starred-block'],
|
||||||
'multiline-ternary': null, // https://eslint.org/docs/rules/multiline-ternary // enforce newlines between operands of ternary expressions
|
'multiline-ternary': ['error', 'always-multiline'], // https://eslint.org/docs/rules/multiline-ternary // enforce newlines between operands of ternary expressions
|
||||||
'new-cap': null, // https://eslint.org/docs/rules/new-cap // require constructor names to begin with a capital letter
|
'new-cap': 'error', // https://eslint.org/docs/rules/new-cap // require constructor names to begin with a capital letter
|
||||||
'new-parens': null, // https://eslint.org/docs/rules/new-parens // enforce or disallow parentheses when invoking a constructor with no arguments
|
'new-parens': ['error', 'never'], // https://eslint.org/docs/rules/new-parens // enforce or disallow parentheses when invoking a constructor with no arguments
|
||||||
'newline-per-chained-call': null, // https://eslint.org/docs/rules/newline-per-chained-call // require a newline after each call in a method chain
|
'newline-per-chained-call': ['error', { ignoreChainWithDepth: 1 }], // https://eslint.org/docs/rules/newline-per-chained-call // require a newline after each call in a method chain
|
||||||
'no-array-constructor': null, // https://eslint.org/docs/rules/no-array-constructor // disallow `Array` constructors
|
'no-array-constructor': 'error', // https://eslint.org/docs/rules/no-array-constructor // disallow `Array` constructors
|
||||||
'no-bitwise': null, // https://eslint.org/docs/rules/no-bitwise // disallow bitwise operators
|
'no-bitwise': 'warn', // https://eslint.org/docs/rules/no-bitwise // disallow bitwise operators
|
||||||
'no-continue': null, // https://eslint.org/docs/rules/no-continue // disallow `continue` statements
|
'no-inline-comments': 'error', // https://eslint.org/docs/rules/no-inline-comments // disallow inline comments after code
|
||||||
'no-inline-comments': null, // https://eslint.org/docs/rules/no-inline-comments // disallow inline comments after code
|
'no-lonely-if': 'error', // https://eslint.org/docs/rules/no-lonely-if // disallow `if` statements as the only statement in `else` blocks
|
||||||
'no-lonely-if': null, // https://eslint.org/docs/rules/no-lonely-if // disallow `if` statements as the only statement in `else` blocks
|
'no-mixed-operators': 'error', // https://eslint.org/docs/rules/no-mixed-operators // disallow mixed binary operators
|
||||||
'no-mixed-operators': null, // https://eslint.org/docs/rules/no-mixed-operators // disallow mixed binary operators
|
'no-multi-assign': 'error', // https://eslint.org/docs/rules/no-multi-assign // disallow use of chained assignment expressions
|
||||||
'no-multi-assign': null, // https://eslint.org/docs/rules/no-multi-assign // disallow use of chained assignment expressions
|
|
||||||
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1, maxBOF: 0 }],
|
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1, maxBOF: 0 }],
|
||||||
'no-negated-condition': null, // https://eslint.org/docs/rules/no-negated-condition // disallow negated conditions
|
'no-negated-condition': 'error', // https://eslint.org/docs/rules/no-negated-condition // disallow negated conditions
|
||||||
'no-nested-ternary': null, // https://eslint.org/docs/rules/no-nested-ternary // disallow nested ternary expressions
|
'no-nested-ternary': 'error', // https://eslint.org/docs/rules/no-nested-ternary // disallow nested ternary expressions
|
||||||
'no-new-object': null, // https://eslint.org/docs/rules/no-new-object // disallow `Object` constructors
|
'no-new-object': 'error', // https://eslint.org/docs/rules/no-new-object // disallow `Object` constructors
|
||||||
'no-plusplus': null, // https://eslint.org/docs/rules/no-plusplus // disallow the unary operators `++` and `--`
|
'no-tabs': 'error', // https://eslint.org/docs/rules/no-tabs // disallow all tabs
|
||||||
'no-restricted-syntax': null, // https://eslint.org/docs/rules/no-restricted-syntax // disallow specified syntax
|
|
||||||
'no-tabs': null, // https://eslint.org/docs/rules/no-tabs // disallow all tabs
|
|
||||||
'no-ternary': null, // https://eslint.org/docs/rules/no-ternary // disallow ternary operators
|
|
||||||
'no-trailing-spaces': 'error',
|
'no-trailing-spaces': 'error',
|
||||||
'no-underscore-dangle': null, // https://eslint.org/docs/rules/no-underscore-dangle // disallow dangling underscores in identifiers
|
'no-underscore-dangle': 'error', // https://eslint.org/docs/rules/no-underscore-dangle // disallow dangling underscores in identifiers
|
||||||
'no-unneeded-ternary': null, // https://eslint.org/docs/rules/no-unneeded-ternary // disallow ternary operators when simpler alternatives exist
|
'no-unneeded-ternary': 'error', // https://eslint.org/docs/rules/no-unneeded-ternary // disallow ternary operators when simpler alternatives exist
|
||||||
'no-whitespace-before-property': null, // https://eslint.org/docs/rules/no-whitespace-before-property // disallow whitespace before properties
|
'no-whitespace-before-property': 'error', // https://eslint.org/docs/rules/no-whitespace-before-property // disallow whitespace before properties
|
||||||
'nonblock-statement-body-position': null, // https://eslint.org/docs/rules/nonblock-statement-body-position // enforce the location of single-line statements
|
'nonblock-statement-body-position': ['error', 'below'], // https://eslint.org/docs/rules/nonblock-statement-body-position // enforce the location of single-line statements
|
||||||
'object-curly-newline': null, // https://eslint.org/docs/rules/object-curly-newline // enforce consistent line breaks inside braces
|
'object-curly-newline': ['error', 'multiline'], // https://eslint.org/docs/rules/object-curly-newline // enforce consistent line breaks inside braces
|
||||||
'object-curly-spacing': null, // https://eslint.org/docs/rules/object-curly-spacing // enforce consistent spacing inside braces
|
'object-curly-spacing': null, // https://eslint.org/docs/rules/object-curly-spacing // enforce consistent spacing inside braces
|
||||||
'object-property-newline': null, // https://eslint.org/docs/rules/object-property-newline // enforce placing object properties on separate lines
|
'object-property-newline': null, // https://eslint.org/docs/rules/object-property-newline // enforce placing object properties on separate lines
|
||||||
'one-var': null, // https://eslint.org/docs/rules/one-var // enforce variables to be declared either together or separately in functions
|
'one-var': null, // https://eslint.org/docs/rules/one-var // enforce variables to be declared either together or separately in functions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user