Skip to content

Commit

Permalink
Add ESLint rules (#1429)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky authored Oct 21, 2020
1 parent 118445f commit f1b2502
Showing 1 changed file with 39 additions and 2 deletions.
41 changes: 39 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,64 @@ module.exports = {
'plugin:you-dont-need-lodash-underscore/all',
],
rules: {
'no-process-exit': 0,
'object-shorthand': 2,
'require-await': 2,
'no-unused-vars': [2, {}],
'no-undef': [2, { typeof: true }],
'ava/no-skip-test': 0,

// Those ESLint rules are not enabled by Prettier, ESLint recommended rules
// nor standard JavaScript. However, they are still useful
'array-callback-return': [2, { allowImplicit: true, checkForEach: true }],
'block-scoped-var': 2,
'consistent-this': 2,
'default-case': 2,
'default-case-last': 2,
'func-name-matching': [2, { considerPropertyDescriptor: true }],
'max-classes-per-file': 2,
'max-params': [2, { max: 4 }],
'multiline-comment-style': [2, 'separate-lines'],
'no-bitwise': 2,
'no-constructor-return': 2,
'no-duplicate-imports': 2,
'no-else-return': [2, { allowElseIf: false }],
'no-extra-label': 2,
'no-implicit-coercion': 2,
'no-implicit-globals': [2, { lexicalBindings: true }],
'no-invalid-this': 2,
'no-label-var': 2,
'no-lonely-if': 2,
'no-loop-func': 2,
'no-loss-of-precision': 2,
'no-multi-assign': 2,
'no-nested-ternary': 2,
'no-plusplus': [2, { allowForLoopAfterthoughts: true }],
'no-unreachable-loop': 2,
'no-useless-backreference': 2,
'no-useless-computed-key': [2, { enforceForClassMembers: true }],
'no-useless-concat': 2,
'no-var': 2,
'object-shorthand': 2,
'operator-assignment': 2,
'padding-line-between-statements': 2,
'prefer-destructuring': 2,
'prefer-exponentiation-operator': 2,
'prefer-numeric-literals': 2,
'prefer-object-spread': 2,
'prefer-regex-literals': [2, { disallowRedundantWrapping: true }],
'prefer-rest-params': 2,
'prefer-spread': 2,
'radix': [2, 'as-needed'],

// TODO: enable the following rules
// 'class-methods-use-this': 2,
// 'no-param-reassign': [
// 2,
// {
// props: true,
// ignorePropertyModificationsFor: ['error', 'req', 'request', 'res', 'response', 'state', 'runState', 't'],
// },
// ],
// strict: 2,

'react/prop-types': 0,

Expand Down

0 comments on commit f1b2502

Please sign in to comment.