UNPKG

@iopipe/eslint-config-iopipe

Version:
110 lines (106 loc) 3.01 kB
module.exports = { env: { browser: true, node: true, }, rules: { 'accessor-pairs': 2, 'array-callback-return': 2, 'block-scoped-var': 2, complexity: [2, 5], 'consistent-return': 2, 'default-case': 2, 'dot-notation': 2, eqeqeq: 2, 'guard-for-in': 2, 'no-alert': 2, 'no-buffer-constructor': 2, 'no-caller': 2, 'no-case-declarations': 2, 'no-div-regex': 2, 'no-else-return': 0, 'no-empty-function': 0, // we're all grown ups here... 'no-empty-pattern': 2, 'no-eq-null': 2, 'no-eval': 2, 'no-extend-native': 2, 'no-extra-bind': 2, 'no-extra-label': 2, 'no-fallthrough': 2, 'no-floating-decimal': 2, 'no-global-assign': 2, 'no-implicit-coercion': 0, 'no-implicit-globals': 2, 'no-implied-eval': 2, 'no-invalid-this': 2, 'no-iterator': 2, 'no-labels': 2, 'no-lone-blocks': 2, 'no-loop-func': 2, 'no-magic-numbers': 0, // sometimes this is ok (foo.length - 1 == index of last one) 'no-multi-str': 2, 'no-native-reassign': 2, 'no-new-func': 2, 'no-new-wrappers': 2, 'no-new': 2, 'no-octal-escape': 2, 'no-octal': 2, 'no-param-reassign': 0, 'no-proto': 2, 'no-redeclare': 2, 'no-restricted-properties': 0, // no ideas of what to disallow right now... 'no-restricted-syntax': [2, 'WithStatement'], 'no-return-assign': 2, 'no-script-url': 2, 'no-self-assign': 2, 'no-self-compare': 2, 'no-sequences': 2, 'no-throw-literal': 2, 'no-unmodified-loop-condition': 2, 'no-unused-expressions': 0, 'no-unused-labels': 2, 'no-useless-call': 2, 'no-useless-concat': 2, 'no-useless-escape': 2, 'no-useless-return': 2, 'no-void': 2, 'no-warning-comments': [2, {terms: ['fixme'], location: 'anywhere'}], 'no-with': 0, 'prefer-promise-reject-errors': 0, // maybe one day... Not sure I'm in... radix: 2, 'require-await': 2, // if you don't need async, don't use async or return Promise.resolve... 'vars-on-top': 2, yoda: 2, // strict strict: 2, // variables 'no-restricted-globals': ['error', 'event', 'fdescribe'], 'no-catch-shadow': 2, 'no-delete-var': 2, 'no-label-var': 2, 'no-shadow-restricted-names': 2, 'no-shadow': 2, 'no-undef-init': 2, 'no-undef': 2, 'no-undefined': 0, 'no-unused-vars': [ 2, { argsIgnorePattern: '^_', varsIgnorePattern: '^ignored', args: 'after-used', }, ], // CommonJS 'callback-return': 0, // see known limitations: http://eslint.org/docs/rules/callback-return it's just annoying... 'global-require': 1, // sometimes this is ok. We shouldn't break a build 'handle-callback-err': 2, 'no-mixed-requires': [2, {grouping: true, allowCall: false}], 'no-new-require': 2, 'no-path-concat': 2, 'no-process-env': 0, 'no-process-exit': 2, 'no-restricted-modules': 0, 'no-sync': 0, }, }