require('eslint-plugin-new-with-error') require('eslint-plugin-no-use-extend-native') require('eslint-plugin-unicorn') module.exports = { env: { node: true }, plugins: [ 'no-use-extend-native', 'unicorn' ], rules: { 'accessor-pairs': 'error', 'array-bracket-newline': ['error', 'consistent'], 'array-bracket-spacing': ['error', 'never'], 'array-callback-return': 'error', 'array-element-newline': 'off', 'block-scoped-var': 'error', 'block-spacing': 'error', 'brace-style': ['error', '1tbs', {allowSingleLine: false}], 'callback-return': 'error', camelcase: 'error', 'capitalized-comments': 'off', 'comma-dangle': ['error', 'never'], 'comma-spacing': ['error', { after: true, before: false }], 'comma-style': 'off', complexity: ['error', 7], 'computed-property-spacing': 'error', 'consistent-return': 'off', 'consistent-this': ['error', 'self'], curly: 'error', 'default-case': 'error', 'dot-location': ['error', 'property'], 'dot-notation': 'error', eqeqeq: 'error', 'eol-last': 'error', 'for-direction': 'error', 'func-call-spacing': 'error', 'func-name-matching': 'error', 'func-names': 'off', 'func-style': ['error', 'declaration'], 'function-paren-newline': ['error', 'consistent'], 'getter-return': 'error', 'global-require': 'error', 'guard-for-in': 'error', 'handle-callback-err': 'error', 'id-blacklist': 'off', 'id-length': 'off', 'id-match': 'off', 'implicit-arrow-linebreak': 'error', indent: ['error', 2, {SwitchCase: 1, VariableDeclarator: 2}], 'init-declarations': 'off', 'jsx-quotes': ['error', 'prefer-double'], 'key-spacing': ['error', { afterColon: true, beforeColon: false }], 'keyword-spacing': ['error', {after: true, before: true}], 'line-comment-position': 'off', 'linebreak-style': ['error', 'unix'], 'lines-around-comment': 'off', 'max-depth': 'error', 'max-len': ['error', 120, 2], 'max-lines': 'off', 'max-nested-callbacks': ['error', 5], 'max-params': ['error', 7], 'max-statements': 'off', 'max-statements-per-line': ['error', {max: 1}], 'multiline-comment-style': 'error', 'multiline-ternary': 'off', 'new-cap': ['error', { capIsNew: true, capIsNewExceptions: ['List', 'Map'], newIsCap: true }], 'new-parens': 'error', 'newline-after-var': 'off', 'newline-before-return': 'error', 'newline-per-chained-call': ['error', {ignoreChainWithDepth: 2}], 'no-alert': 'error', 'no-array-constructor': 'error', 'no-bitwise': 'error', 'no-buffer-constructor': 'error', 'no-caller': 'error', 'no-case-declarations': 'error', 'no-catch-shadow': 'error', 'no-compare-neg-zero': 'error', 'no-cond-assign': ['error', 'always'], 'no-console': 'off', 'no-constant-condition': 'error', 'no-continue': 'error', 'no-control-regex': 'error', 'no-debugger': 'error', 'no-delete-var': 'error', 'no-div-regex': 'error', 'no-dupe-args': 'error', 'no-dupe-keys': 'error', 'no-duplicate-case': 'error', 'no-else-return': 'error', 'no-empty': 'error', 'no-empty-character-class': 'error', 'no-empty-function': 'error', 'no-empty-pattern': 'error', 'no-eq-null': 'error', 'no-eval': 'error', 'no-ex-assign': 'error', 'no-extend-native': 'error', 'no-extra-bind': 'error', 'no-extra-boolean-cast': 'error', 'no-extra-label': 'error', 'no-extra-parens': ['error', 'all'], 'no-extra-semi': 'error', 'no-fallthrough': 'error', 'no-floating-decimal': 'error', 'no-func-assign': 'error', 'no-global-assign': 'error', 'no-implicit-coercion': ['error', {boolean: false, number: true, string: true}], 'no-implicit-globals': 'error', 'no-implied-eval': 'error', 'no-inline-comments': 'error', 'no-inner-declarations': 'error', 'no-invalid-regexp': 'error', 'no-invalid-this': 'error', 'no-irregular-whitespace': 'error', 'no-iterator': 'error', 'no-label-var': 'error', 'no-labels': 'error', 'no-lone-blocks': 'error', 'no-lonely-if': 'error', 'no-loop-func': 'error', 'no-magic-numbers': 'off', 'no-mixed-operators': 'error', 'no-mixed-requires': 'off', 'no-mixed-spaces-and-tabs': 'error', 'no-multi-assign': 'error', 'no-multi-spaces': 'error', 'no-multi-str': 'error', 'no-multiple-empty-lines': ['error', {max: 1}], 'no-negated-condition': 'off', 'no-negated-in-lhs': 'error', 'no-nested-ternary': 'error', 'no-new': 'error', 'no-new-func': 'error', 'no-new-object': 'error', 'no-new-require': 'error', 'no-new-wrappers': 'error', 'no-obj-calls': 'error', 'no-octal': 'error', 'no-octal-escape': 'error', 'no-param-reassign': 'error', 'no-path-concat': 'error', 'no-plusplus': 'off', 'no-process-env': 'error', 'no-process-exit': 'off', 'no-proto': 'error', 'no-prototype-builtins': 'error', 'no-redeclare': 'error', 'no-regex-spaces': 'error', 'no-restricted-globals': 'off', 'no-restricted-modules': 'off', 'no-restricted-properties': 'off', 'no-restricted-syntax': 'off', 'no-return-assign': 'error', 'no-script-url': 'error', 'no-self-assign': 'error', 'no-self-compare': 'error', 'no-sequences': 'error', 'no-shadow': 'error', 'no-shadow-restricted-names': 'error', 'no-spaced-func': 'error', 'no-sparse-arrays': 'error', 'no-sync': 'off', 'no-tabs': 'error', 'no-ternary': 'off', 'no-throw-literal': 'error', 'no-trailing-spaces': 'error', 'no-undef': 'error', 'no-undef-init': 'error', 'no-undefined': 'off', 'no-underscore-dangle': 'error', 'no-unexpected-multiline': 'error', 'no-unmodified-loop-condition': 'error', 'no-unneeded-ternary': 'error', 'no-unreachable': 'error', 'no-unsafe-finally': 'error', 'no-unsafe-negation': 'error', 'no-unused-expressions': 'error', 'no-unused-labels': 'error', 'no-unused-vars': 'error', 'no-use-before-define': ['error', 'nofunc'], 'no-use-extend-native/no-use-extend-native': 'error', 'no-useless-call': 'error', 'no-useless-computed-key': 'error', 'no-useless-concat': 'error', 'no-useless-escape': 'error', 'no-useless-return': 'error', 'no-void': 'error', 'no-warning-comments': ['error', { location: 'anywhere', terms: [ 'fixme', 'todo', 'xxx' ] }], 'no-whitespace-before-property': 'error', 'no-with': 'error', 'nonblock-statement-body-position': 'off', 'object-curly-newline': 'off', 'object-curly-spacing': 'error', 'object-property-newline': 'off', 'one-var': ['error', {let: 'always', var: 'always'}], 'one-var-declaration-per-line': ['error', 'initializations'], 'operator-assignment': ['error', 'always'], 'operator-linebreak': 'error', 'padded-blocks': ['error', 'never'], 'padding-line-between-statements': 'off', 'prefer-promise-reject-errors': 'error', 'quote-props': ['error', 'as-needed'], quotes: ['error', 'single'], radix: 'error', 'require-jsdoc': 'off', semi: ['error', 'never'], 'semi-spacing': ['error', { after: true, before: false }], 'semi-style': 'error', 'sort-keys': 'off', 'sort-vars': 'off', 'space-before-blocks': ['error', 'always'], 'space-before-function-paren': ['error', { anonymous: 'always', named: 'never' }], 'space-in-parens': ['error', 'never'], 'space-infix-ops': 'error', 'space-unary-ops': ['error', { nonwords: false, words: true }], 'spaced-comment': ['error', 'always'], strict: [0], 'switch-colon-spacing': 'error', 'unicode-bom': 'error', 'use-isnan': 'error', 'valid-jsdoc': ['error', { requireParamDescription: true, requireReturn: false, requireReturnDescription: true }], 'valid-typeof': 'error', 'vars-on-top': 'error', 'wrap-iife': ['error', 'outside'], 'wrap-regex': 'error', 'unicorn/catch-error-name': 'off', 'unicorn/custom-error-definition': 'error', 'unicorn/escape-case': 'error', 'unicorn/explicit-length-check': 'off', 'unicorn/error-message': 'error', 'unicorn/filename-case': ['error', {case: 'kebabCase'}], 'unicorn/import-index': 'error', 'unicorn/new-for-builtins': 'error', 'unicorn/no-abusive-eslint-disable': 'error', 'unicorn/no-array-instanceof': 'error', 'unicorn/no-fn-reference-in-iterator': 'error', 'unicorn/no-hex-escape': 'error', 'unicorn/no-new-buffer': 'error', 'unicorn/no-process-exit': 'error', 'unicorn/no-unsafe-regex': 'error', 'unicorn/number-literal-case': 'error', 'unicorn/prefer-add-event-listener': 'error', 'unicorn/prefer-starts-ends-with': 'error', 'unicorn/prefer-type-error': 'error', 'unicorn/regex-shorthand': 'error', 'unicorn/throw-new-error': 'error', yoda: ['error', 'never'] } }