|
|
|
module.exports = {
|
|
|
|
env: {
|
|
|
|
es6: true,
|
|
|
|
node: true
|
|
|
|
},
|
|
|
|
extends: [
|
|
|
|
'eslint:recommended'
|
|
|
|
],
|
|
|
|
parserOptions: {
|
|
|
|
ecmaFeatures: {
|
|
|
|
experimentalObjectRestSpread: true
|
|
|
|
},
|
|
|
|
ecmaVersion: 2017,
|
|
|
|
sourceType: 'script'
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
'accessor-pairs': 'error',
|
|
|
|
'array-bracket-newline': [ 'error', 'consistent' ],
|
|
|
|
'array-bracket-spacing': [ 'error', 'always' ],
|
|
|
|
'array-callback-return': 'error',
|
|
|
|
'arrow-body-style': 'error',
|
|
|
|
'arrow-parens': [ 'error', 'as-needed' ],
|
|
|
|
'arrow-spacing': 'error',
|
|
|
|
'block-scoped-var': 'error',
|
|
|
|
'block-spacing': 'error',
|
|
|
|
'brace-style': 'error',
|
|
|
|
'callback-return': 'error',
|
|
|
|
'camelcase': 'warn',
|
|
|
|
'capitalized-comments': 'error',
|
|
|
|
'comma-spacing': 'error',
|
|
|
|
'comma-style': 'error',
|
|
|
|
'complexity': 'error',
|
|
|
|
'computed-property-spacing': 'error',
|
|
|
|
'consistent-return': 'error',
|
|
|
|
'consistent-this': [ 'error', 'self' ],
|
|
|
|
'default-case': 'error',
|
|
|
|
'dot-location': [ 'error', 'property' ],
|
|
|
|
'dot-notation': 'error',
|
|
|
|
'eol-last': 'error',
|
|
|
|
'eqeqeq': 'error',
|
|
|
|
'for-direction': 'error',
|
|
|
|
'func-call-spacing': 'error',
|
|
|
|
'func-name-matching': 'error',
|
|
|
|
'generator-star-spacing': [ 'error', 'after' ],
|
|
|
|
'getter-return': 'error',
|
|
|
|
'global-require': 'error',
|
|
|
|
'handle-callback-err': 'error',
|
|
|
|
'indent': [ 'error', 'tab' ],
|
|
|
|
'key-spacing': 'error',
|
|
|
|
'keyword-spacing': 'error',
|
|
|
|
'linebreak-style': 'error',
|
|
|
|
'lines-between-class-members': 'error',
|
|
|
|
'max-len': 'error',
|
|
|
|
'max-nested-callbacks': 'error',
|
|
|
|
'new-parens': 'error',
|
|
|
|
'newline-per-chained-call': [ 'error', { 'ignoreChainWithDepth': 4 } ],
|
|
|
|
'no-alert': 'error',
|
|
|
|
'no-array-constructor': 'error',
|
|
|
|
'no-await-in-loop': 'error',
|
|
|
|
'no-buffer-constructor': 'error',
|
|
|
|
'no-caller': 'error',
|
|
|
|
'no-catch-shadow': 'error',
|
|
|
|
'no-duplicate-imports': [ 'error', { 'includeExports': true } ],
|
|
|
|
'no-else-return': [ 'error', { 'allowElseIf': false } ],
|
|
|
|
'no-empty-function': 'error',
|
|
|
|
'no-eq-null': 'error',
|
|
|
|
'no-eval': 'error',
|
|
|
|
'no-extend-native': 'error',
|
|
|
|
'no-extra-bind': 'error',
|
|
|
|
'no-extra-label': 'error',
|
|
|
|
'no-extra-parens': 'error',
|
|
|
|
'no-floating-decimal': 'error',
|
|
|
|
'no-implicit-coercion': 'error',
|
|
|
|
'no-implicit-globals': 'error',
|
|
|
|
'no-implied-eval': 'error',
|
|
|
|
'no-invalid-this': 'error',
|
|
|
|
'no-iterator': 'error',
|
|
|
|
'no-label-var': 'error',
|
|
|
|
'no-labels': 'warn',
|
|
|
|
'no-lone-blocks': 'error',
|
|
|
|
'no-lonely-if': 'error',
|
|
|
|
'no-loop-func': 'error',
|
|
|
|
'no-mixed-requires': 'error',
|
|
|
|
'no-multi-assign': 'error',
|
|
|
|
'no-multi-spaces': 'error',
|
|
|
|
'no-multi-str': 'error',
|
|
|
|
'no-multiple-empty-lines': 'error',
|
|
|
|
'no-negated-condition': 'error',
|
|
|
|
'no-nested-ternary': 'warn',
|
|
|
|
'no-new': 'error',
|
|
|
|
'no-new-func': 'error',
|
|
|
|
'no-new-object': 'error',
|
|
|
|
'no-new-require': 'error',
|
|
|
|
'no-new-wrappers': 'error',
|
|
|
|
'no-octal-escape': 'error',
|
|
|
|
'no-param-reassign': [ 'error', { 'props': true } ],
|
|
|
|
'no-path-concat': 'error',
|
|
|
|
'no-plusplus': [ 'warn', { 'allowForLoopAfterthoughts': true } ],
|
|
|
|
'no-process-env': 'warn',
|
|
|
|
'no-process-exit': 'error',
|
|
|
|
'no-proto': 'error',
|
|
|
|
'no-return-assign': [ 'error', 'always' ],
|
|
|
|
'no-return-await': 'error',
|
|
|
|
'no-script-url': 'error',
|
|
|
|
'no-self-compare': 'error',
|
|
|
|
'no-sequences': 'error',
|
|
|
|
'no-shadow': [ 'warn', { 'builtinGlobals': true } ],
|
|
|
|
'no-sync': [ 'error', { 'allowAtRootLevel': true } ],
|
|
|
|
'no-throw-literal': 'error',
|
|
|
|
'no-trailing-spaces': 'error',
|
|
|
|
'no-undef-init': 'error',
|
|
|
|
'no-underscore-dangle': 'error',
|
|
|
|
'no-unmodified-loop-condition': 'error',
|
|
|
|
'no-unneeded-ternary': 'error',
|
|
|
|
'no-unused-expressions': 'error',
|
|
|
|
'no-use-before-define': 'error',
|
|
|
|
'no-useless-call': 'error',
|
|
|
|
'no-useless-computed-key': 'error',
|
|
|
|
'no-useless-concat': 'error',
|
|
|
|
'no-useless-constructor': 'error',
|
|
|
|
'no-useless-rename': 'error',
|
|
|
|
'no-useless-return': 'error',
|
|
|
|
'no-var': 'error',
|
|
|
|
'no-void': 'error',
|
|
|
|
'no-whitespace-before-property': 'error',
|
|
|
|
'no-with': 'error',
|
|
|
|
'object-curly-spacing': [ 'error', 'always' ],
|
|
|
|
'object-property-newline': [ 'error', {
|
|
|
|
'allowMultiplePropertiesPerLine': true
|
|
|
|
} ],
|
|
|
|
'object-shorthand': 'error',
|
|
|
|
'operator-linebreak': 'error',
|
|
|
|
'prefer-arrow-callback': 'error',
|
|
|
|
'prefer-const': 'error',
|
|
|
|
'prefer-destructuring': 'error',
|
|
|
|
'prefer-numeric-literals': 'error',
|
|
|
|
'prefer-promise-reject-errors': 'error',
|
|
|
|
'prefer-rest-params': 'error',
|
|
|
|
'prefer-spread': 'error',
|
|
|
|
'quote-props': [ 'error', 'as-needed', { 'keywords': false } ],
|
|
|
|
'radix': 'error',
|
|
|
|
'require-await': 'error',
|
|
|
|
'require-jsdoc': 'warn',
|
|
|
|
'rest-spread-spacing': 'error',
|
|
|
|
'semi': 'error',
|
|
|
|
'semi-spacing': 'error',
|
|
|
|
'semi-style': 'error',
|
|
|
|
'space-before-blocks': 'error',
|
|
|
|
'space-before-function-paren': [ 'error', { 'named': 'never' } ],
|
|
|
|
'space-in-parens': 'error',
|
|
|
|
'space-infix-ops': 'error',
|
|
|
|
'space-unary-ops': 'error',
|
|
|
|
'spaced-comment': 'error',
|
|
|
|
'strict': 'error',
|
|
|
|
'switch-colon-spacing': 'error',
|
|
|
|
'symbol-description': 'error',
|
|
|
|
'template-curly-spacing': 'error',
|
|
|
|
'template-tag-spacing': 'error',
|
|
|
|
'unicode-bom': 'error',
|
|
|
|
'valid-jsdoc': 'error', // TODO: Check options
|
|
|
|
'vars-on-top': 'error',
|
|
|
|
'wrap-iife': [ 'error', 'inside' ],
|
|
|
|
'yield-star-spacing': 'error',
|
|
|
|
'yoda': [ 'error', 'never', { 'exceptRange': true } ]
|
|
|
|
}
|
|
|
|
};
|