|
| 1 | +const eslintrc = { |
| 2 | + "parser": "babel-eslint", |
| 3 | + "extends": "airbnb", |
| 4 | + "env": { |
| 5 | + "browser": true, |
| 6 | + "node": true, |
| 7 | + "es6": true, |
| 8 | + "mocha": true, |
| 9 | + "jest": true, |
| 10 | + "jasmine": true |
| 11 | + }, |
| 12 | + "plugins": [ |
| 13 | + "react", |
| 14 | + "import" |
| 15 | + ], |
| 16 | + "parserOptions": { |
| 17 | + parser: 'babel-eslint', |
| 18 | + }, |
| 19 | + "rules": { |
| 20 | + "linebreak-style": 0, |
| 21 | + "func-names": 0, |
| 22 | + "sort-imports": 0, |
| 23 | + "arrow-body-style": 0, |
| 24 | + "prefer-destructuring": 0, |
| 25 | + "max-len": 0, |
| 26 | + "consistent-return": 0, |
| 27 | + "comma-dangle": [ |
| 28 | + "error", |
| 29 | + "always-multiline" |
| 30 | + ], |
| 31 | + "function-paren-newline": 0, |
| 32 | + "class-methods-use-this": 0, |
| 33 | + "react/sort-comp": 0, |
| 34 | + "react/prop-types": 0, |
| 35 | + "react/jsx-first-prop-new-line": 0, |
| 36 | + "react/require-extension": 0, |
| 37 | + "react/jsx-filename-extension": [ |
| 38 | + 1, |
| 39 | + { |
| 40 | + "extensions": [ |
| 41 | + ".js", |
| 42 | + ".jsx" |
| 43 | + ] |
| 44 | + } |
| 45 | + ], |
| 46 | + "import/extensions": 0, |
| 47 | + "import/no-unresolved": 0, |
| 48 | + "import/no-extraneous-dependencies": 0, |
| 49 | + "import/prefer-default-export": 0, |
| 50 | + "jsx-a11y/no-static-element-interactions": 0, |
| 51 | + "jsx-a11y/anchor-has-content": 0, |
| 52 | + "jsx-a11y/click-events-have-key-events": 0, |
| 53 | + "jsx-a11y/anchor-is-valid": 0, |
| 54 | + "jsx-a11y/label-has-for": 0, |
| 55 | + "jsx-a11y/no-noninteractive-element-interactions": 0, |
| 56 | + "jsx-a11y/mouse-events-have-key-events": 0, |
| 57 | + "react/no-danger": 0, |
| 58 | + "react/jsx-no-bind": 0, |
| 59 | + "react/forbid-prop-types": 0, |
| 60 | + "react/require-default-props": 0, |
| 61 | + "react/no-did-mount-set-state": 0, |
| 62 | + "react/no-array-index-key": 0, |
| 63 | + "react/no-find-dom-node": 0, |
| 64 | + "react/no-unused-state": 0, |
| 65 | + "react/no-unused-prop-types": 0, |
| 66 | + "react/default-props-match-prop-types": 0, |
| 67 | + "react/jsx-curly-spacing": 0, |
| 68 | + "react/no-render-return-value": 0, |
| 69 | + "object-curly-newline": 0, |
| 70 | + "no-param-reassign": 0, |
| 71 | + "no-return-assign": 0, |
| 72 | + "no-redeclare": 0, |
| 73 | + "no-restricted-globals": 0, |
| 74 | + "no-restricted-syntax": 0, |
| 75 | + "no-underscore-dangle": 0, |
| 76 | + "no-unused-expressions": 0 |
| 77 | + } |
| 78 | +} |
| 79 | + |
| 80 | +if (process.env.NODE_ENV === 'development') { |
| 81 | + Object.assign(eslintrc.rules, |
| 82 | + { |
| 83 | + 'no-console': 0, |
| 84 | + 'no-unused-vars': 0, |
| 85 | + }); |
| 86 | +} |
| 87 | + |
| 88 | +module.exports = eslintrc |
0 commit comments