|
@ -4,8 +4,7 @@ module.exports = { |
|
|
node: true |
|
|
node: true |
|
|
}, |
|
|
}, |
|
|
extends: [ |
|
|
extends: [ |
|
|
'eslint:recommended', |
|
|
'eslint:recommended' |
|
|
// 'cleanjs'
|
|
|
|
|
|
], |
|
|
], |
|
|
parserOptions: { |
|
|
parserOptions: { |
|
|
ecmaFeatures: { |
|
|
ecmaFeatures: { |
|
@ -26,12 +25,11 @@ module.exports = { |
|
|
'block-spacing': 'error', |
|
|
'block-spacing': 'error', |
|
|
'brace-style': 'error', |
|
|
'brace-style': 'error', |
|
|
'callback-return': 'error', |
|
|
'callback-return': 'error', |
|
|
camelcase: 'warn', |
|
|
'camelcase': 'warn', |
|
|
'capitalized-comments': 'error', |
|
|
'capitalized-comments': 'error', |
|
|
'class-methods-use-this': 'error', |
|
|
|
|
|
'comma-spacing': 'error', |
|
|
'comma-spacing': 'error', |
|
|
'comma-style': 'error', |
|
|
'comma-style': 'error', |
|
|
complexity: 'error', |
|
|
'complexity': 'error', |
|
|
'computed-property-spacing': 'error', |
|
|
'computed-property-spacing': 'error', |
|
|
'consistent-return': 'error', |
|
|
'consistent-return': 'error', |
|
|
'consistent-this': [ 'error', 'self' ], |
|
|
'consistent-this': [ 'error', 'self' ], |
|
@ -39,16 +37,15 @@ module.exports = { |
|
|
'dot-location': [ 'error', 'property' ], |
|
|
'dot-location': [ 'error', 'property' ], |
|
|
'dot-notation': 'error', |
|
|
'dot-notation': 'error', |
|
|
'eol-last': 'error', |
|
|
'eol-last': 'error', |
|
|
eqeqeq: 'error', |
|
|
'eqeqeq': 'error', |
|
|
'for-direction': 'error', |
|
|
'for-direction': 'error', |
|
|
'func-call-spacing': 'error', |
|
|
'func-call-spacing': 'error', |
|
|
'func-name-matching': 'error', |
|
|
'func-name-matching': 'error', |
|
|
'func-names': [ 'error', 'as-needed' ], |
|
|
|
|
|
'generator-star-spacing': [ 'error', 'after' ], |
|
|
'generator-star-spacing': [ 'error', 'after' ], |
|
|
'getter-return': 'error', |
|
|
'getter-return': 'error', |
|
|
'global-require': 'error', |
|
|
'global-require': 'error', |
|
|
'handle-callback-err': 'error', |
|
|
'handle-callback-err': 'error', |
|
|
indent: [ 'error', 'tab' ], |
|
|
'indent': [ 'error', 'tab' ], |
|
|
'key-spacing': 'error', |
|
|
'key-spacing': 'error', |
|
|
'keyword-spacing': 'error', |
|
|
'keyword-spacing': 'error', |
|
|
'linebreak-style': 'error', |
|
|
'linebreak-style': 'error', |
|
@ -56,15 +53,15 @@ module.exports = { |
|
|
'max-len': 'error', |
|
|
'max-len': 'error', |
|
|
'max-nested-callbacks': 'error', |
|
|
'max-nested-callbacks': 'error', |
|
|
'new-parens': 'error', |
|
|
'new-parens': 'error', |
|
|
'newline-per-chained-call': [ 'error', { ignoreChainWithDepth: 4 } ], |
|
|
'newline-per-chained-call': [ 'error', { 'ignoreChainWithDepth': 4 } ], |
|
|
'no-alert': 'error', |
|
|
'no-alert': 'error', |
|
|
'no-array-constructor': 'error', |
|
|
'no-array-constructor': 'error', |
|
|
'no-await-in-loop': 'error', |
|
|
'no-await-in-loop': 'error', |
|
|
'no-buffer-constructor': 'error', |
|
|
'no-buffer-constructor': 'error', |
|
|
'no-caller': 'error', |
|
|
'no-caller': 'error', |
|
|
'no-catch-shadow': 'error', |
|
|
'no-catch-shadow': 'error', |
|
|
'no-duplicate-imports': [ 'error', { includeExports: true } ], |
|
|
'no-duplicate-imports': [ 'error', { 'includeExports': true } ], |
|
|
'no-else-return': [ 'error', { allowElseIf: false } ], |
|
|
'no-else-return': [ 'error', { 'allowElseIf': false } ], |
|
|
'no-empty-function': 'error', |
|
|
'no-empty-function': 'error', |
|
|
'no-eq-null': 'error', |
|
|
'no-eq-null': 'error', |
|
|
'no-eval': 'error', |
|
|
'no-eval': 'error', |
|
@ -96,9 +93,9 @@ module.exports = { |
|
|
'no-new-require': 'error', |
|
|
'no-new-require': 'error', |
|
|
'no-new-wrappers': 'error', |
|
|
'no-new-wrappers': 'error', |
|
|
'no-octal-escape': 'error', |
|
|
'no-octal-escape': 'error', |
|
|
'no-param-reassign': [ 'error', { props: true } ], |
|
|
'no-param-reassign': [ 'error', { 'props': true } ], |
|
|
'no-path-concat': 'error', |
|
|
'no-path-concat': 'error', |
|
|
'no-plusplus': [ 'warn', { allowForLoopAfterthoughts: true } ], |
|
|
'no-plusplus': [ 'warn', { 'allowForLoopAfterthoughts': true } ], |
|
|
'no-process-env': 'warn', |
|
|
'no-process-env': 'warn', |
|
|
'no-process-exit': 'error', |
|
|
'no-process-exit': 'error', |
|
|
'no-proto': 'error', |
|
|
'no-proto': 'error', |
|
@ -107,8 +104,8 @@ module.exports = { |
|
|
'no-script-url': 'error', |
|
|
'no-script-url': 'error', |
|
|
'no-self-compare': 'error', |
|
|
'no-self-compare': 'error', |
|
|
'no-sequences': 'error', |
|
|
'no-sequences': 'error', |
|
|
'no-shadow': [ 'warn', { builtinGlobals: true } ], |
|
|
'no-shadow': [ 'warn', { 'builtinGlobals': true } ], |
|
|
'no-sync': [ 'error', { allowAtRootLevel: true } ], |
|
|
'no-sync': [ 'error', { 'allowAtRootLevel': true } ], |
|
|
'no-throw-literal': 'error', |
|
|
'no-throw-literal': 'error', |
|
|
'no-trailing-spaces': 'error', |
|
|
'no-trailing-spaces': 'error', |
|
|
'no-undef-init': 'error', |
|
|
'no-undef-init': 'error', |
|
@ -129,7 +126,7 @@ module.exports = { |
|
|
'no-with': 'error', |
|
|
'no-with': 'error', |
|
|
'object-curly-spacing': [ 'error', 'always' ], |
|
|
'object-curly-spacing': [ 'error', 'always' ], |
|
|
'object-property-newline': [ 'error', { |
|
|
'object-property-newline': [ 'error', { |
|
|
allowMultiplePropertiesPerLine: true |
|
|
'allowMultiplePropertiesPerLine': true |
|
|
} ], |
|
|
} ], |
|
|
'object-shorthand': 'error', |
|
|
'object-shorthand': 'error', |
|
|
'operator-linebreak': 'error', |
|
|
'operator-linebreak': 'error', |
|
@ -140,22 +137,21 @@ module.exports = { |
|
|
'prefer-promise-reject-errors': 'error', |
|
|
'prefer-promise-reject-errors': 'error', |
|
|
'prefer-rest-params': 'error', |
|
|
'prefer-rest-params': 'error', |
|
|
'prefer-spread': 'error', |
|
|
'prefer-spread': 'error', |
|
|
// 'pure/pure': 'error',
|
|
|
'quote-props': [ 'error', 'as-needed', { 'keywords': false } ], |
|
|
'quote-props': [ 'error', 'as-needed', { keywords: false } ], |
|
|
'radix': 'error', |
|
|
radix: 'error', |
|
|
|
|
|
'require-await': 'error', |
|
|
'require-await': 'error', |
|
|
'require-jsdoc': 'warn', |
|
|
'require-jsdoc': 'warn', |
|
|
'rest-spread-spacing': 'error', |
|
|
'rest-spread-spacing': 'error', |
|
|
semi: 'error', |
|
|
'semi': 'error', |
|
|
'semi-spacing': 'error', |
|
|
'semi-spacing': 'error', |
|
|
'semi-style': 'error', |
|
|
'semi-style': 'error', |
|
|
'space-before-blocks': 'error', |
|
|
'space-before-blocks': 'error', |
|
|
'space-before-function-paren': [ 'error', { named: 'never' } ], |
|
|
'space-before-function-paren': [ 'error', { 'named': 'never' } ], |
|
|
'space-in-parens': 'error', |
|
|
'space-in-parens': 'error', |
|
|
'space-infix-ops': 'error', |
|
|
'space-infix-ops': 'error', |
|
|
'space-unary-ops': 'error', |
|
|
'space-unary-ops': 'error', |
|
|
'spaced-comment': 'error', |
|
|
'spaced-comment': 'error', |
|
|
strict: 'error', |
|
|
'strict': 'error', |
|
|
'switch-colon-spacing': 'error', |
|
|
'switch-colon-spacing': 'error', |
|
|
'symbol-description': 'error', |
|
|
'symbol-description': 'error', |
|
|
'template-curly-spacing': 'error', |
|
|
'template-curly-spacing': 'error', |
|
@ -165,6 +161,6 @@ module.exports = { |
|
|
'vars-on-top': 'error', |
|
|
'vars-on-top': 'error', |
|
|
'wrap-iife': [ 'error', 'inside' ], |
|
|
'wrap-iife': [ 'error', 'inside' ], |
|
|
'yield-star-spacing': 'error', |
|
|
'yield-star-spacing': 'error', |
|
|
yoda: [ 'error', 'never', { exceptRange: true } ] |
|
|
'yoda': [ 'error', 'never', { 'exceptRange': true } ] |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |