|
| 1 | +module.exports = { |
| 2 | + extends: ['airbnb', 'plugin:prettier/recommended'], |
| 3 | + parser: '@typescript-eslint/parser', |
| 4 | + plugins: ['@typescript-eslint', 'jest', 'import', 'prettier', 'react-hooks'], |
| 5 | + env: { |
| 6 | + browser: true, |
| 7 | + 'jest/globals': true, |
| 8 | + }, |
| 9 | + rules: { |
| 10 | + // False positive on arg types: |
| 11 | + // https://github.com/typescript-eslint/typescript-eslint/issues/46 |
| 12 | + // '@typescript-eslint/no-unused-vars': ['error', { args: 'none' }], |
| 13 | + 'import/no-unresolved': 'off', |
| 14 | + 'prettier/prettier': 'error', |
| 15 | + 'react/jsx-filename-extension': ['error', { extensions: ['.js', '.tsx'] }], |
| 16 | + semi: ['error', 'never'], |
| 17 | + |
| 18 | + // Temporary disabled rules |
| 19 | + '@typescript-eslint/no-unused-vars': 'off', |
| 20 | + 'jsx-a11y/click-events-have-key-events': 'off', |
| 21 | + 'jsx-a11y/no-static-element-interactions': 'off', |
| 22 | + 'jsx-a11y/alt-text': 'off', |
| 23 | + 'jsx-a11y/anchor-is-valid': 'off', |
| 24 | + 'jsx-a11y/label-has-for': 'off', |
| 25 | + 'jsx-a11y/label-has-associated-control': 'off', |
| 26 | + 'jsx-a11y/no-noninteractive-tabindex': 'off', |
| 27 | + 'import/export': 'off', |
| 28 | + 'import/first': 'off', |
| 29 | + 'import/order': 'off', |
| 30 | + 'import/no-dynamic-require': 'off', |
| 31 | + 'import/no-extraneous-dependencies': 'off', |
| 32 | + 'import/no-named-default': 'off', |
| 33 | + 'import/no-useless-path-segments': 'off', |
| 34 | + 'import/newline-after-import': 'off', |
| 35 | + 'import/prefer-default-export': 'off', |
| 36 | + 'react/button-has-type': 'off', |
| 37 | + 'react/destructuring-assignment': 'off', |
| 38 | + 'react/default-props-match-prop-types': 'off', |
| 39 | + 'react/jsx-curly-brace-presence': 'off', |
| 40 | + 'react/jsx-boolean-value': 'off', |
| 41 | + 'react/jsx-no-bind': 'off', |
| 42 | + 'react/jsx-one-expression-per-line': 'off', |
| 43 | + 'react/jsx-pascal-case': 'off', |
| 44 | + 'react/jsx-wrap-multilines': 'off', |
| 45 | + 'react/no-access-state-in-setstate': 'off', |
| 46 | + 'react/no-children-prop': 'off', |
| 47 | + 'react/no-array-index-key': 'off', |
| 48 | + 'react/no-find-dom-node': 'off', |
| 49 | + 'react/jsx-no-target-blank': 'off', |
| 50 | + 'react/forbid-prop-types': 'off', |
| 51 | + 'react/prefer-stateless-function': 'off', |
| 52 | + 'react/no-multi-comp': 'off', |
| 53 | + 'react/no-unused-prop-types': 'off', |
| 54 | + 'react/no-unused-state': 'off', |
| 55 | + 'react/no-unescaped-entities': 'off', |
| 56 | + 'react/prop-types': 'off', |
| 57 | + 'react/require-default-props': 'off', |
| 58 | + 'react/sort-comp': 'off', |
| 59 | + 'react/no-string-refs': 'off', |
| 60 | + 'react/no-render-return-value': 'off', |
| 61 | + camelcase: 'off', |
| 62 | + 'class-methods-use-this': 'off', |
| 63 | + 'consistent-return': 'off', |
| 64 | + 'default-case': 'off', |
| 65 | + 'dot-notation': 'off', |
| 66 | + 'global-require': 'off', |
| 67 | + 'guard-for-in': 'off', |
| 68 | + 'lines-between-class-members': 'off', |
| 69 | + 'no-await-in-loop': 'off', |
| 70 | + 'no-bitwise': 'off', |
| 71 | + 'no-case-declarations': 'off', |
| 72 | + 'no-empty': 'off', |
| 73 | + 'no-continue': 'off', |
| 74 | + 'no-extra-boolean-cast': 'off', |
| 75 | + 'no-fallthrough': 'off', |
| 76 | + 'no-nested-ternary': 'off', |
| 77 | + 'no-param-reassign': 'off', |
| 78 | + 'no-plusplus': 'off', |
| 79 | + 'no-prototype-builtins': 'off', |
| 80 | + 'no-return-await': 'off', |
| 81 | + 'no-return-assign': 'off', |
| 82 | + 'no-restricted-globals': 'off', |
| 83 | + 'no-restricted-syntax': 'off', |
| 84 | + 'no-throw-literal': 'off', |
| 85 | + 'no-sparse-arrays': 'off', |
| 86 | + 'no-shadow': 'off', |
| 87 | + 'no-undef': 'off', |
| 88 | + 'no-undef-init': 'off', |
| 89 | + 'no-underscore-dangle': 'off', |
| 90 | + 'no-unused-expressions': 'off', |
| 91 | + 'no-useless-return': 'off', |
| 92 | + 'no-unused-vars': 'off', |
| 93 | + 'no-empty-function': 'off', |
| 94 | + 'no-useless-constructor': 'off', |
| 95 | + 'no-useless-escape': 'off', |
| 96 | + 'no-use-before-define': 'off', |
| 97 | + 'operator-assignment': 'off', |
| 98 | + 'prefer-destructuring': 'off', |
| 99 | + 'spaced-comment': 'off', |
| 100 | + }, |
| 101 | + overrides: [ |
| 102 | + { |
| 103 | + files: '**/jest.config.js', |
| 104 | + rules: { |
| 105 | + 'global-require': 'off', |
| 106 | + }, |
| 107 | + }, |
| 108 | + { |
| 109 | + files: '**/test/**/*.{ts,tsx}', |
| 110 | + rules: { |
| 111 | + 'import/no-extraneous-dependencies': 'off', |
| 112 | + }, |
| 113 | + }, |
| 114 | + ], |
| 115 | + settings: { |
| 116 | + 'import/resolver': { |
| 117 | + node: { |
| 118 | + extensions: ['.js', '.jsx', '.ts', '.tsx'], |
| 119 | + }, |
| 120 | + }, |
| 121 | + }, |
| 122 | +} |
0 commit comments