|
8 | 8 |
|
9 | 9 | "plugins": ["react"],
|
10 | 10 |
|
11 |
| - "ecmaFeatures": { |
12 |
| - "arrowFunctions": true, |
13 |
| - "binaryLiterals": true, |
14 |
| - "blockBindings": true, |
15 |
| - "classes": true, |
16 |
| - "defaultParams": true, |
17 |
| - "destructuring": true, |
18 |
| - "forOf": true, |
19 |
| - "generators": true, |
20 |
| - "modules": true, |
21 |
| - "objectLiteralComputedProperties": true, |
22 |
| - "objectLiteralDuplicateProperties": true, |
23 |
| - "objectLiteralShorthandMethods": true, |
24 |
| - "objectLiteralShorthandProperties": true, |
25 |
| - "octalLiterals": true, |
26 |
| - "regexUFlag": true, |
27 |
| - "regexYFlag": true, |
28 |
| - "spread": true, |
29 |
| - "superInFunctions": true, |
30 |
| - "templateStrings": true, |
31 |
| - "unicodeCodePointEscapes": true, |
32 |
| - "globalReturn": true, |
33 |
| - "jsx": true |
| 11 | + "extends": [ |
| 12 | + "eslint:recommended", |
| 13 | + "plugin:react/recommended" |
| 14 | + ], |
| 15 | + |
| 16 | + "settings": { |
| 17 | + "react": { |
| 18 | + "pragma": "React", |
| 19 | + "version": "16.0.0", |
| 20 | + "flowVersion": "0.53" |
| 21 | + } |
| 22 | + }, |
| 23 | + |
| 24 | + "parserOptions": { |
| 25 | + "sourceType": "module", |
| 26 | + "ecmaFeatures": { |
| 27 | + "arrowFunctions": true, |
| 28 | + "binaryLiterals": true, |
| 29 | + "blockBindings": true, |
| 30 | + "classes": true, |
| 31 | + "defaultParams": true, |
| 32 | + "destructuring": true, |
| 33 | + "forOf": true, |
| 34 | + "generators": true, |
| 35 | + "modules": true, |
| 36 | + "objectLiteralComputedProperties": true, |
| 37 | + "objectLiteralDuplicateProperties": true, |
| 38 | + "objectLiteralShorthandMethods": true, |
| 39 | + "objectLiteralShorthandProperties": true, |
| 40 | + "octalLiterals": true, |
| 41 | + "regexUFlag": true, |
| 42 | + "regexYFlag": true, |
| 43 | + "spread": true, |
| 44 | + "superInFunctions": true, |
| 45 | + "templateStrings": true, |
| 46 | + "unicodeCodePointEscapes": true, |
| 47 | + "globalReturn": true, |
| 48 | + "jsx": true |
| 49 | + } |
34 | 50 | },
|
35 | 51 |
|
36 | 52 | "rules": {
|
|
87 | 103 | "no-caller": 2, // disallow use of arguments.caller or arguments.callee
|
88 | 104 | "no-div-regex": 2, // disallow division operators explicitly at beginning of regular expression (off by default)
|
89 | 105 | "no-else-return": 2, // disallow else after a return in an if (off by default)
|
90 |
| - "no-empty-label": 2, // disallow use of labels for anything other then loops and switches |
91 | 106 | "no-eq-null": 2, // disallow comparisons to null without a type-checking operator (off by default)
|
92 | 107 | "no-eval": 2, // disallow use of eval()
|
93 | 108 | "no-extend-native": 2, // disallow adding to native types
|
|
164 | 179 | "func-style": 0, // enforces use of function declarations or expressions (off by default)
|
165 | 180 | "key-spacing": [1, {"beforeColon": false, "afterColon": true}], // enforces spacing between keys and values in object literal properties
|
166 | 181 | "max-nested-callbacks": [1, 3], // specify the maximum depth callbacks can be nested (off by default)
|
167 |
| - "new-cap": [1, {newIsCap: true, capIsNew: false}], // require a capital letter for constructors |
| 182 | + "new-cap": [1, {"newIsCap": true, "capIsNew": false}], // require a capital letter for constructors |
168 | 183 | "new-parens": 1, // disallow the omission of parentheses when invoking a constructor with no arguments
|
169 | 184 | "newline-after-var": 0, // allow/disallow an empty newline after var statement (off by default)
|
170 | 185 | "no-array-constructor": 1, // disallow use of the Array constructor
|
|
178 | 193 | "no-ternary": 0, // disallow the use of ternary operators (off by default)
|
179 | 194 | "no-trailing-spaces": 1, // disallow trailing whitespace at the end of lines
|
180 | 195 | "no-underscore-dangle": 0, // disallow dangling underscores in identifiers
|
181 |
| - "no-extra-parens": [1, "functions"], // disallow wrapping of non-IIFE statements in parens |
182 | 196 | "one-var": [1, "never"], // allow just one var statement per function (off by default)
|
183 | 197 | "operator-assignment": [1, "always"], // require assignment operator shorthand where possible or prohibit it entirely (off by default)
|
184 | 198 | "padded-blocks": [1, "never"], // enforce padding within blocks (off by default)
|
185 |
| - "quote-props": [1, "as-needed"], // require quotes around object literal property names (off by default) |
186 | 199 | "quotes": [0, "double"], // specify whether double or single quotes should be used
|
187 | 200 | "semi": [2, "always"], // require or disallow use of semicolons instead of ASI
|
188 | 201 | "semi-spacing": [1, {"before": false, "after": true}], // enforce spacing before and after semicolons
|
189 | 202 | "sort-vars": 0, // sort variables within the same declaration block (off by default)
|
190 |
| - "space-after-keywords": [1, "always"], // require a space after certain keywords (off by default) |
| 203 | + "keyword-spacing": [1, {"before": true, "after": true}], // require a space after certain keywords (off by default) |
191 | 204 | "space-before-blocks": [1, "always"], // require or disallow space before blocks (off by default)
|
192 | 205 | "space-before-function-paren": [1, {"anonymous": "never", "named": "never"}], // require or disallow space before function opening parenthesis (off by default)
|
193 | 206 | "object-curly-spacing": [1, "never"], // require or disallow spaces inside brackets (off by default)
|
|
237 | 250 | "react/no-unknown-property": 2, // Prevent usage of unknown DOM property
|
238 | 251 | "react/prop-types": 2, // Prevent missing props validation in a React component definition
|
239 | 252 | "react/react-in-jsx-scope": 2, // Prevent missing React when using JSX
|
240 |
| - "react/self-closing-comp": 2, // Prevent extra closing tags for components without children |
241 |
| - "react/wrap-multilines": 2, // Prevent missing parentheses around multilines JSX |
| 253 | + "react/self-closing-comp": 2 // Prevent extra closing tags for components without children |
242 | 254 | }
|
243 | 255 | }
|
0 commit comments