|
| 1 | +{ |
| 2 | + "parser" : "babel-eslint", |
| 3 | + "extends" : [ |
| 4 | + "standard", |
| 5 | + "airbnb", |
| 6 | + "plugin:flowtype/recommended", |
| 7 | + "plugin:jest/recommended" |
| 8 | + ], |
| 9 | + "plugins": [ |
| 10 | + "babel", |
| 11 | + "promise", |
| 12 | + "flowtype", |
| 13 | + "jest" |
| 14 | + ], |
| 15 | + "env" : { |
| 16 | + "jest/globals": true |
| 17 | + }, |
| 18 | + "settings": { |
| 19 | + "import/resolver": { |
| 20 | + "node": { |
| 21 | + "paths": ["src"] |
| 22 | + } |
| 23 | + } |
| 24 | + }, |
| 25 | + "rules": { |
| 26 | + // ESLint Rules |
| 27 | + "no-console": 2, |
| 28 | + "no-extra-semi": 2, |
| 29 | + "no-multi-spaces": 0, |
| 30 | + "key-spacing": 0, |
| 31 | + "no-return-assign": 0, |
| 32 | + "curly": 0, |
| 33 | + "padded-blocks": 0, |
| 34 | + "brace-style": 0, |
| 35 | + "space-before-function-paren": [2, "never"], |
| 36 | + "semi" : [2, "never"], |
| 37 | + "max-len": [2, 120, 2], |
| 38 | + "no-trailing-spaces": 0, |
| 39 | + |
| 40 | + |
| 41 | + // Babel Rules |
| 42 | + "babel/generator-star-spacing": 2, |
| 43 | + "babel/new-cap": 2, |
| 44 | + "babel/array-bracket-spacing": 2, |
| 45 | + "babel/object-curly-spacing": [2, "always"], |
| 46 | + "babel/object-shorthand": 2, |
| 47 | + "babel/arrow-parens": [0, "as-needed"], |
| 48 | + "babel/no-await-in-loop": 2, |
| 49 | + "babel/flow-object-type": 2, |
| 50 | + "babel/func-params-comma-dangle": 2, |
| 51 | + |
| 52 | + // Jest |
| 53 | + "jest/no-disabled-tests": "warn", |
| 54 | + "jest/no-focused-tests": "error", |
| 55 | + "jest/no-identical-title": "error", |
| 56 | + "jest/valid-expect": "error", |
| 57 | + |
| 58 | + // React Rules |
| 59 | + "react/forbid-component-props": [0], |
| 60 | + "react/forbid-prop-types": [0], |
| 61 | + "react/no-children-prop": [2], |
| 62 | + "react/no-danger": [0], |
| 63 | + "react/no-danger-with-children": [2], |
| 64 | + "react/no-deprecated": [2], |
| 65 | + "react/no-did-mount-set-state": [2], |
| 66 | + "react/no-did-update-set-state": [2], |
| 67 | + "react/no-direct-mutation-state": [2], |
| 68 | + "react/no-find-dom-node": [2], |
| 69 | + "react/no-is-mounted": [2], |
| 70 | + "react/no-multi-comp": [2], |
| 71 | + "react/no-set-state": [0], |
| 72 | + "react/no-string-refs": [2], |
| 73 | + "react/no-unescaped-entities": [2], |
| 74 | + "react/no-unknown-property": [2], |
| 75 | + "react/no-unused-prop-types": [0], |
| 76 | + "react/prefer-es6-class": [2, "always"], |
| 77 | + "react/prefer-stateless-function": [2], |
| 78 | + "react/prop-types": [2], |
| 79 | + "react/react-in-jsx-scope": [2], |
| 80 | + "react/require-optimization": [1], |
| 81 | + "react/require-render-return": [2], |
| 82 | + "react/self-closing-comp": [2], |
| 83 | + "react/sort-comp": [2, { |
| 84 | + "order": [ |
| 85 | + "static-methods", |
| 86 | + "state", |
| 87 | + "lifecycle", |
| 88 | + "/^on.+$/", |
| 89 | + "/^handle.+$/", |
| 90 | + "everything-else", |
| 91 | + "/^get.+$/", |
| 92 | + "rendering" |
| 93 | + ], |
| 94 | + "groups": { |
| 95 | + "rendering": [ |
| 96 | + "/^render.+$/", |
| 97 | + "render" |
| 98 | + ] |
| 99 | + } |
| 100 | + }], |
| 101 | + "react/sort-prop-types": [0], |
| 102 | + "react/style-prop-object": [2], |
| 103 | + |
| 104 | + // React JSX Rules |
| 105 | + "react/jsx-boolean-value": [0], |
| 106 | + "react/jsx-closing-bracket-location": [0], |
| 107 | + "react/jsx-curly-spacing": [2], |
| 108 | + "react/jsx-equals-spacing": [2], |
| 109 | + "react/jsx-filename-extension": [2, { "extensions": [".js"] }], |
| 110 | + "react/jsx-first-prop-new-line": [2, "multiline-multiprop"], |
| 111 | + "react/jsx-handler-names": [2], |
| 112 | + "react/jsx-indent": [2, 2], |
| 113 | + "react/jsx-indent-props": [0, 2], |
| 114 | + "react/jsx-key": [2], |
| 115 | + "react/jsx-no-bind": [1], |
| 116 | + "react/jsx-no-comment-textnodes": [2], |
| 117 | + "react/jsx-no-duplicate-props": [2], |
| 118 | + "react/jsx-no-literals": [0], |
| 119 | + "react/jsx-no-target-blank": [2], |
| 120 | + "react/jsx-no-undef": [2], |
| 121 | + "react/jsx-pascal-case": [2], |
| 122 | + "react/jsx-space-before-closing": [2], |
| 123 | + "react/jsx-uses-react": [2], |
| 124 | + "react/jsx-uses-vars": [2], |
| 125 | + "react/jsx-wrap-multilines": [2], |
| 126 | + |
| 127 | + // a11y Rules |
| 128 | + "jsx-a11y/img-has-alt": [0], |
| 129 | + "jsx-a11y/img-redundant-alt": [2], |
| 130 | + "jsx-a11y/aria-role": [2], |
| 131 | + "jsx-a11y/no-access-key": [2], |
| 132 | + "jsx-a11y/href-no-hash": "off" |
| 133 | + |
| 134 | + } |
| 135 | +} |
0 commit comments