|
| 1 | +{ |
| 2 | + "parser" : "babel-eslint", |
| 3 | + "parserOptions" : { |
| 4 | + "ecmaVersion" : 6, |
| 5 | + "sourceType" : "module", |
| 6 | + "ecmaFeatures" : { "jsx" : true } |
| 7 | + }, |
| 8 | + "ecmaFeatures" : { "jsx" : true }, |
| 9 | + "env" : { |
| 10 | + "browser" : true, |
| 11 | + "node" : true, |
| 12 | + "jest" : true |
| 13 | + }, |
| 14 | + "plugins" : [ "react" ], |
| 15 | + "extends" : "eslint:recommended", |
| 16 | + "rules" : { |
| 17 | + // React |
| 18 | + "react/no-deprecated" : "error", |
| 19 | + "react/no-did-mount-set-state" : "error", |
| 20 | + "react/no-did-update-set-state" : "error", |
| 21 | + "react/no-direct-mutation-state" : "error", |
| 22 | + "react/no-multi-comp" : "error", |
| 23 | + "react/prefer-es6-class" : [ "error", "always" ], |
| 24 | + "react/react-in-jsx-scope" : "error", |
| 25 | + "react/require-render-return" : "error", |
| 26 | + // JSX |
| 27 | + "react/jsx-boolean-value" : "warn", |
| 28 | + "react/jsx-curly-spacing" : [ "warn", "never" ], |
| 29 | + "react/jsx-equals-spacing" : [ "error", "never" ], |
| 30 | + "react/jsx-filename-extension" : [ "error", { "extensions" : [ ".js", ".jsx" ] } ], |
| 31 | + "react/jsx-first-prop-new-line" : [ "warn", "multiline" ], |
| 32 | + "react/jsx-indent" : [ "warn", 4 ], |
| 33 | + "react/jsx-indent-props" : [ "warn", 4 ], |
| 34 | + "react/jsx-max-props-per-line" : [ "warn", { "maximum" : 1 } ], |
| 35 | + "react/jsx-no-duplicate-props" : "error", |
| 36 | + "react/jsx-no-undef" : "error", |
| 37 | + "react/jsx-pascal-case" : "error", |
| 38 | + "react/jsx-space-before-closing" : [ "error", "always" ], |
| 39 | + "react/jsx-uses-react" : "error", |
| 40 | + "react/jsx-uses-vars" : "error", |
| 41 | + "react/jsx-wrap-multilines" : "warn", |
| 42 | + // Possible Errors |
| 43 | + "no-console" : "off", |
| 44 | + // Best Practices |
| 45 | + "class-methods-use-this" : "warn", |
| 46 | + "complexity" : [ "warn", 32 ], |
| 47 | + "consistent-return" : "warn", |
| 48 | + "dot-location" : [ "error", "property" ], |
| 49 | + "eqeqeq" : "error", |
| 50 | + "no-extra-bind" : "error", |
| 51 | + "no-extra-label" : "error", |
| 52 | + "no-fallthrough" : "off", |
| 53 | + "no-floating-decimal" : "error", |
| 54 | + "no-invalid-this" : "error", |
| 55 | + "no-labels" : "error", |
| 56 | + "no-lone-blocks" : "warn", |
| 57 | + "no-magic-numbers" : [ "warn", { "ignore" : [ -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 60, 1000 ] } ], |
| 58 | + "no-param-reassign" : "warn", |
| 59 | + "no-redeclare" : "error", |
| 60 | + "no-self-compare" : "error", |
| 61 | + "no-undef" : "off", |
| 62 | + "no-unused-expressions" : "warn", |
| 63 | + "no-unused-vars" : "warn", |
| 64 | + // Node.js and CommonJS |
| 65 | + "no-sync" : "warn", |
| 66 | + // Stylistic Issues |
| 67 | + "array-bracket-spacing" : [ "warn", "always" ], |
| 68 | + "camelcase" : "warn", |
| 69 | + "comma-dangle" : "error", |
| 70 | + "comma-spacing" : [ |
| 71 | + "error", { |
| 72 | + "before" : false, |
| 73 | + "after" : true |
| 74 | + } |
| 75 | + ], |
| 76 | + "comma-style" : [ "error", "last" ], |
| 77 | + "consistent-this" : [ "error", "self" ], |
| 78 | + "eol-last" : "error", |
| 79 | + "indent" : [ |
| 80 | + "error", 4, { |
| 81 | + "SwitchCase" : 1 |
| 82 | + } |
| 83 | + ], |
| 84 | + "jsx-quotes" : [ "warn", "prefer-double" ], |
| 85 | + "key-spacing" : [ |
| 86 | + "warn", { |
| 87 | + "beforeColon" : true, |
| 88 | + "afterColon" : true, |
| 89 | + "mode" : "minimum", |
| 90 | + "align" : "colon" |
| 91 | + } |
| 92 | + ], |
| 93 | + "keyword-spacing" : [ |
| 94 | + "warn", { |
| 95 | + "before" : true, |
| 96 | + "after" : true |
| 97 | + } |
| 98 | + ], |
| 99 | + "max-depth" : [ "warn", 4 ], |
| 100 | + "max-nested-callbacks" : [ "warn", 4 ], |
| 101 | + "max-params" : [ "warn", 6 ], |
| 102 | + "new-cap" : "warn", |
| 103 | + "no-multiple-empty-lines" : [ |
| 104 | + "error", { |
| 105 | + "max" : 1, |
| 106 | + "maxEOF" : 1, |
| 107 | + "maxBOF" : 0 |
| 108 | + } |
| 109 | + ], |
| 110 | + "no-tabs" : "error", |
| 111 | + "no-trailing-spaces" : "error", |
| 112 | + "no-whitespace-before-property" : "error", |
| 113 | + "one-var-declaration-per-line" : [ "error", "always" ], |
| 114 | + "padded-blocks" : [ "error", "never" ], |
| 115 | + "quotes" : [ "error", "single" ], |
| 116 | + "semi-spacing" : [ |
| 117 | + "error", { |
| 118 | + "before" : false, |
| 119 | + "after" : true |
| 120 | + } |
| 121 | + ], |
| 122 | + "semi" : [ "error", "always" ], |
| 123 | + "space-in-parens" : [ "error", "never" ], |
| 124 | + // ECMAScript 6 |
| 125 | + "arrow-spacing" : [ |
| 126 | + "error", { |
| 127 | + "before" : true, |
| 128 | + "after" : true |
| 129 | + } |
| 130 | + ], |
| 131 | + "no-class-assign" : "error", |
| 132 | + "no-const-assign" : "error", |
| 133 | + "no-confusing-arrow" : "error", |
| 134 | + "no-dupe-class-members" : "error", |
| 135 | + "no-duplicate-imports" : "error", |
| 136 | + "no-this-before-super" : "error", |
| 137 | + "no-var" : "error", |
| 138 | + "prefer-const" : "warn" |
| 139 | + } |
| 140 | +} |
0 commit comments