|
| 1 | +module.exports = { |
| 2 | + "env": { |
| 3 | + "node": true, |
| 4 | + "browser": true, |
| 5 | + "mocha": true, |
| 6 | + "es6": true |
| 7 | + }, |
| 8 | + "extends": "eslint:recommended", |
| 9 | + "parser": "babel-eslint", |
| 10 | + "parserOptions": { |
| 11 | + "arrowFunctions": true, |
| 12 | + "binaryLiterals": true, |
| 13 | + "blockBindings": true, |
| 14 | + "classes": true, |
| 15 | + "defaultParams": true, |
| 16 | + "destructuring": true, |
| 17 | + "forOf": true, |
| 18 | + "generators": true, |
| 19 | + "modules": true, |
| 20 | + "objectLiteralComputedProperties": true, |
| 21 | + "objectLiteralDuplicateProperties": true, |
| 22 | + "objectLiteralShorthandMethods": true, |
| 23 | + "objectLiteralShorthandProperties": true, |
| 24 | + "octalLiterals": true, |
| 25 | + "sourceType": "module", |
| 26 | + "spread": true, |
| 27 | + "templateStrings": true, |
| 28 | + "globalReturn": true, // React JSX support |
| 29 | + "jsx": true |
| 30 | + }, |
| 31 | + "plugins": ["react"], |
| 32 | + "rules": { |
| 33 | + "camelcase": 2, |
| 34 | + "comma-dangle": 2, |
| 35 | + "comma-style": [2, "last"], |
| 36 | + "consistent-this": [2, "self"], |
| 37 | + "curly": [2, "all"], |
| 38 | + "eol-last": 2, |
| 39 | + "eqeqeq": 2, |
| 40 | + "func-names": 2, |
| 41 | + "indent": [2, 2], |
| 42 | + "max-len": [2, 120, 2], // 2 spaces per tab, max 120 chars per line |
| 43 | + "new-cap": 2, |
| 44 | + "no-array-constructor": 2, |
| 45 | + "no-inner-declarations": [2, "both"], |
| 46 | + "no-mixed-spaces-and-tabs": 2, |
| 47 | + "no-new-object": 2, |
| 48 | + "no-shadow-restricted-names": 2, |
| 49 | + "no-trailing-spaces": [2, { "skipBlankLines": false }], |
| 50 | + "no-underscore-dangle": 0, // dangling underscores are fine |
| 51 | + "quotes": [2, "single", "avoid-escape"], |
| 52 | + "quote-props": [2, "consistent-as-needed"], |
| 53 | + "radix": 2, |
| 54 | + |
| 55 | + "semi": [2, "always"], |
| 56 | + "space-before-blocks": [2, "always"], |
| 57 | + "space-infix-ops": 2, |
| 58 | + "strict": [2, "global"], |
| 59 | + "vars-on-top": 2, |
| 60 | + |
| 61 | + "react/display-name": 1, |
| 62 | + "react/forbid-prop-types": 1, |
| 63 | + "jsx-quotes": 1, |
| 64 | + "react/jsx-boolean-value": 1, |
| 65 | + "react/jsx-closing-bracket-location": 1, |
| 66 | + "react/jsx-curly-spacing": 1, |
| 67 | + "react/jsx-max-props-per-line": 1, |
| 68 | + "react/jsx-no-duplicate-props": 1, |
| 69 | + "react/jsx-no-undef": 1, |
| 70 | + "react/jsx-sort-props": 1, |
| 71 | + "react/jsx-uses-react": 1, |
| 72 | + "react/jsx-uses-vars": 1, |
| 73 | + "react/jsx-wrap-multilines": 1, |
| 74 | + "react/no-danger": 1, |
| 75 | + "react/no-did-mount-set-state": 1, |
| 76 | + "react/no-did-update-set-state": 1, |
| 77 | + "react/no-direct-mutation-state": 1, |
| 78 | + "react/no-multi-comp": 1, |
| 79 | + "react/no-set-state": 1, |
| 80 | + "react/no-unknown-property": 1, |
| 81 | + "react/react-in-jsx-scope": 1, |
| 82 | + "react/self-closing-comp": 1, |
| 83 | + "react/sort-comp": 1, |
| 84 | + "react/sort-prop-types": 1 |
| 85 | + } |
| 86 | +} |
0 commit comments