|
| 1 | +# "off" or 0 - turn the rule off |
| 2 | +# "warn" or 1 - turn the rule on as a warning(doesn’ t affect exit code) |
| 3 | +# "error" or 2 - turn the rule on as an error(exit code is 1 when triggered) |
| 4 | +{ |
| 5 | + "parser": "babel-eslint", |
| 6 | + "env": { |
| 7 | + "browser": true |
| 8 | + }, |
| 9 | + "plugins": [ |
| 10 | + "react", |
| 11 | + "react-native" |
| 12 | + ], |
| 13 | + "ecmaFeatures": { |
| 14 | + "jsx": true |
| 15 | + }, |
| 16 | + "extends": ["eslint:recommended", "plugin:react/recommended"], |
| 17 | + "rules": { |
| 18 | + "react-native/split-platform-components": 2, |
| 19 | + "react/no-did-mount-set-state": 2, |
| 20 | + "react/no-did-update-set-state": 2, |
| 21 | + "react/no-direct-mutation-state": 2, |
| 22 | + "react/jsx-uses-vars": 2, |
| 23 | + "no-unused-vars": ["error", { |
| 24 | + "varsIgnorePattern": "React" |
| 25 | + }], |
| 26 | + "comma-spacing": ["error", { |
| 27 | + "before": false, |
| 28 | + "after": true }], |
| 29 | + "no-undef": 2, |
| 30 | + "semi": 2, |
| 31 | + "react/prop-types": 2, |
| 32 | + "react/jsx-no-bind": 2, |
| 33 | + "react/jsx-no-duplicate-props": 2, |
| 34 | + "space-before-blocks": 2, |
| 35 | + "space-before-function-paren": 2, |
| 36 | + "space-in-parens": 2, |
| 37 | + "space-infix-ops": 2, |
| 38 | + "space-unary-ops": 2, |
| 39 | + "spaced-comment": 2, |
| 40 | + "rest-spread-spacing": 2, |
| 41 | + "semi-spacing": 2, |
| 42 | + "no-unneeded-ternary": 2, |
| 43 | + "eqeqeq": 2, |
| 44 | + "dot-location": 2, |
| 45 | + "no-extra-bind": 2, |
| 46 | + "keyword-spacing": 2, |
| 47 | + "key-spacing": 2, |
| 48 | + "indent": ["error", 2], |
| 49 | + "react/jsx-indent": [2, 2], |
| 50 | + "func-call-spacing": 2, |
| 51 | + "array-bracket-spacing": 2, |
| 52 | + "block-spacing": 2, |
| 53 | + "brace-style": 2, |
| 54 | + "arrow-body-style": 2, |
| 55 | + "arrow-parens": 2, |
| 56 | + "arrow-spacing": 2, |
| 57 | + "react/self-closing-comp": 2, |
| 58 | + "jsx-quotes": ["error", "prefer-single"], |
| 59 | + "object-curly-spacing": 2, |
| 60 | + "quotes": ["error", "single"], |
| 61 | + "no-console": 0 |
| 62 | + }, |
| 63 | + "globals": { |
| 64 | + "global": false, |
| 65 | + "it": false, |
| 66 | + "xit": false, |
| 67 | + "expect": false, |
| 68 | + "describe": false, |
| 69 | + "require": false, |
| 70 | + "module": false, |
| 71 | + "Promise": false, |
| 72 | + "__DEV__": false |
| 73 | + } |
| 74 | +} |
0 commit comments