|
| 1 | +module.exports = { |
| 2 | + 'parser': 'babel-eslint', |
| 3 | + 'env': { |
| 4 | + 'browser': true, |
| 5 | + 'node': true, |
| 6 | + 'mocha': true |
| 7 | + }, |
| 8 | + 'extends': [ |
| 9 | + 'prettier', |
| 10 | + 'prettier/react', |
| 11 | + 'airbnb', |
| 12 | + 'plugin:react/recommended', |
| 13 | + ], |
| 14 | + 'plugins': [ |
| 15 | + 'import', |
| 16 | + 'prettier', |
| 17 | + 'react', |
| 18 | + ], |
| 19 | + 'rules': { |
| 20 | + 'linebreak-style': 0, |
| 21 | + 'react/sort-comp': 0, |
| 22 | + 'max-classes-per-file': 0, |
| 23 | + 'import/prefer-default-export': 0, |
| 24 | + 'consistent-return': 0, |
| 25 | + 'no-unused-expressions': 0, |
| 26 | + 'jsx-props-no-spreading': 0, |
| 27 | + 'class-methods-use-this': 0, |
| 28 | + 'eol-last': 0, |
| 29 | + 'react/prefer-stateless-function': 0, |
| 30 | + 'react/static-property-placement': 0, |
| 31 | + 'react/jsx-props-no-spreading': 0, |
| 32 | + 'no-use-before-define': 0, |
| 33 | + 'global-require': 0, |
| 34 | + 'arrow-body-style': 0, |
| 35 | + 'jsx-a11y/click-events-have-key-events': 0, // there are valid cases for this e.g. forms |
| 36 | + 'jsx-a11y/interactive-supports-focus': 0, // there are valid cases for this e.g. forms |
| 37 | + 'jsx-a11y/label-has-associated-control': 0, // rule seems buggy, doesn't understand some htmlFor cases |
| 38 | + 'jsx-a11y/label-has-for': 0, |
| 39 | + 'jsx-a11y/mouse-events-have-key-events': 0, |
| 40 | + 'jsx-a11y/no-noninteractive-element-interactions': 0, // rule seems buggy, doesn't understand some htmlFor cases |
| 41 | + 'max-len': 0, |
| 42 | + 'no-multi-assign': 0, |
| 43 | + 'no-nested-ternary': 0, |
| 44 | + 'no-param-reassign': 0, //Disabled to it not looking for global components |
| 45 | + 'no-plusplus': 0, |
| 46 | + 'no-restricted-globals': 'off', |
| 47 | + 'no-return-assign': 0, |
| 48 | + 'camelcase': 0, |
| 49 | + 'no-underscore-dangle': 0, |
| 50 | + 'object-curly-newline': 0, |
| 51 | + 'prefer-destructuring': 0, |
| 52 | + 'quote-props': 0, |
| 53 | + 'radix': 0, |
| 54 | + 'indent': [ |
| 55 | + "error", 4, |
| 56 | + { |
| 57 | + SwitchCase: 1, |
| 58 | + ignoredNodes: ['JSXElement', 'JSXElement > *', 'JSXAttribute', 'JSXIdentifier', 'JSXNamespacedName', 'JSXMemberExpression', 'JSXSpreadAttribute', 'JSXExpressionContainer', 'JSXOpeningElement', 'JSXClosingElement', 'JSXText', 'JSXEmptyExpression', 'JSXSpreadChild'], |
| 59 | + }, |
| 60 | + ], |
| 61 | + 'react/jsx-indent': ["error", 4], |
| 62 | + 'react/jsx-indent-props': ["error", 2], |
| 63 | + 'react/jsx-max-props-per-line': [1, |
| 64 | + { |
| 65 | + 'maximum': 3 |
| 66 | + } |
| 67 | + ], |
| 68 | + 'jsx-a11y/anchor-is-valid': 0, |
| 69 | + 'react/destructuring-assignment': 0, |
| 70 | + 'react/forbid-prop-types': 0, |
| 71 | + 'react/jsx-filename-extension': 0, |
| 72 | + 'react/jsx-one-expression-per-line': 0, |
| 73 | + 'react/jsx-no-undef': 0, |
| 74 | + 'react/jsx-pascal-case': 0, |
| 75 | + 'react/jsx-tag-spacing': 0, //Disabled to it not looking for global components |
| 76 | + 'react/no-access-state-in-setstate': 0, |
| 77 | + 'react/no-array-index-key': 0, // there are valid cases for this where a key can not be determined |
| 78 | + 'react/no-direct-mutation-state': 0, |
| 79 | + 'react/no-find-dom-node': 0, |
| 80 | + 'react/no-multi-comp': 0, |
| 81 | + 'react/no-string-refs': 0, // todo: Disable for now, need to update probably for react 17 |
| 82 | + 'react/no-unescaped-entities': 0, // there are valid cases for this where a key can not be determined |
| 83 | + 'react/require-default-props': 0, |
| 84 | + }, |
| 85 | + 'globals': { |
| 86 | + '_': true, |
| 87 | + '__DEV__': true, |
| 88 | + 'API': true, |
| 89 | + 'E2E': true, |
| 90 | + 'Utils': true, |
| 91 | + 'Constants': true, |
| 92 | + 'Strings': true, |
| 93 | + 'describe': true, |
| 94 | + 'Format': true, |
| 95 | + 'FormGroup': true, |
| 96 | + 'ga': true, |
| 97 | + 'Link': true, |
| 98 | + 'openAlert': true, |
| 99 | + 'openConfirm': true, |
| 100 | + 'mixpanel': true, |
| 101 | + 'Loader': true, |
| 102 | + 'Project': true, |
| 103 | + 'propTypes': true, |
| 104 | + 'Radio': true, |
| 105 | + 'React': true, |
| 106 | + 'ReactDOM': true, |
| 107 | + 'Row': true, |
| 108 | + 'pact': true, |
| 109 | + } |
| 110 | +}; |
0 commit comments