|
1 | 1 | module.exports = { |
2 | | - 'parser': 'babel-eslint', |
3 | | - 'extends': ['airbnb', 'plugin:jest/recommended'], |
4 | | - 'rules': { |
5 | | - 'indent': [1, 'spaces'], |
6 | | - 'linebreak-style': [1, 'unix'], |
7 | | - 'quotes': [1, 'single'], |
8 | | - 'max-len': [1, 120], |
9 | | - 'no-multiple-empty-lines': [1, {'max': 2, 'maxBOF': 0, 'maxEOF': 0}], |
10 | | - 'no-trailing-spaces': 1, |
11 | | - 'react/jsx-tag-spacing': {'beforeSelfClosing': 'allow'}, |
12 | | - 'arrow-parens': [1, 'always'], |
13 | | - 'import/no-extraneous-dependencies': [1, {'devDependencies': true}], |
14 | | - 'react/jsx-filename-extension': [1, {'extensions': ['.js', '.jsx']}], |
15 | | - 'no-unused-vars': 1, |
16 | | - 'import/first': 1, |
17 | | - 'import/newline-after-import': 1, |
18 | | - 'semi': 1, |
19 | | - 'react/prefer-stateless-function': 1, |
20 | | - 'block-spacing': 1, |
21 | | - 'comma-spacing': 1, |
22 | | - 'semi-spacing': 1, |
23 | | - 'padded-blocks': 1, |
24 | | - 'key-spacing': 1, |
25 | | - 'no-plusplus': [1, {'allowForLoopAfterthoughts': true}], |
26 | | - 'eol-last': 1, |
| 2 | + parser: "babel-eslint", |
| 3 | + parserOptions: { |
| 4 | + ecmaFeatures: { |
| 5 | + legacyDecorators: true |
| 6 | + } |
| 7 | + }, |
| 8 | + extends: ["airbnb", "plugin:jest/recommended"], |
| 9 | + rules: { |
| 10 | + indent: [1, "spaces"], |
| 11 | + "linebreak-style": [1, "unix"], |
| 12 | + quotes: [1, "single"], |
| 13 | + "max-len": [1, 120], |
| 14 | + "no-multiple-empty-lines": [1, { max: 2, maxBOF: 0, maxEOF: 0 }], |
| 15 | + "no-trailing-spaces": 1, |
| 16 | + "react/jsx-tag-spacing": { beforeSelfClosing: "allow" }, |
| 17 | + "arrow-parens": [1, "always"], |
| 18 | + "import/no-extraneous-dependencies": [1, { devDependencies: true }], |
| 19 | + "react/jsx-filename-extension": [1, { extensions: [".js", ".jsx"] }], |
| 20 | + "no-unused-vars": 1, |
| 21 | + "import/first": 1, |
| 22 | + "import/newline-after-import": 1, |
| 23 | + semi: 1, |
| 24 | + "react/prefer-stateless-function": 1, |
| 25 | + "block-spacing": 1, |
| 26 | + "comma-spacing": 1, |
| 27 | + "semi-spacing": 1, |
| 28 | + "padded-blocks": 1, |
| 29 | + "key-spacing": 1, |
| 30 | + "no-plusplus": [1, { allowForLoopAfterthoughts: true }], |
| 31 | + "eol-last": 1, |
27 | 32 |
|
28 | | - 'no-underscore-dangle': 0, |
29 | | - 'jsx-filename-extension': 0, |
30 | | - 'comma-dangle': 0, |
31 | | - 'jsx-quotes': [0, 'prefer-single'], |
32 | | - 'object-curly-spacing': 0, |
33 | | - 'no-multi-spaces': 0, |
34 | | - 'import/prefer-default-export': 0, |
35 | | - 'import/no-duplicates': 0, |
36 | | - 'react/no-array-index-key': 0, |
37 | | - 'react/sort-comp': 0, |
38 | | - 'class-methods-use-this': 0, |
39 | | - 'default-case': 0, |
40 | | - 'no-mixed-operators': 0, |
41 | | - 'operator-linebreak': 0, |
42 | | - 'react/destructuring-assignment': 0, |
43 | | - 'implicit-arrow-linebreak': 0, |
44 | | - 'react/jsx-one-expression-per-line': 0, |
45 | | - 'react/jsx-props-no-multi-spaces': 0, |
46 | | - 'react/jsx-wrap-multilines': 0, |
| 33 | + "no-underscore-dangle": 0, |
| 34 | + "jsx-filename-extension": 0, |
| 35 | + "comma-dangle": 0, |
| 36 | + "jsx-quotes": [0, "prefer-single"], |
| 37 | + "object-curly-spacing": 0, |
| 38 | + "no-multi-spaces": 0, |
| 39 | + "import/prefer-default-export": 0, |
| 40 | + "import/no-duplicates": 0, |
| 41 | + "react/no-array-index-key": 0, |
| 42 | + "react/sort-comp": 0, |
| 43 | + "class-methods-use-this": 0, |
| 44 | + "default-case": 0, |
| 45 | + "no-mixed-operators": 0, |
| 46 | + "operator-linebreak": 0, |
| 47 | + "react/destructuring-assignment": 0, |
| 48 | + "implicit-arrow-linebreak": 0, |
| 49 | + "react/jsx-one-expression-per-line": 0, |
| 50 | + "react/jsx-props-no-multi-spaces": 0, |
| 51 | + "react/jsx-wrap-multilines": 0, |
47 | 52 |
|
48 | 53 | // Maybe enable later: |
49 | | - 'jsx-a11y/click-events-have-key-events': 0, |
50 | | - 'jsx-a11y/label-has-associated-control': 0, |
51 | | - 'jsx-a11y/label-has-for': 0, |
52 | | - 'jsx-a11y/no-static-element-interactions': 0, |
53 | | - 'prefer-template': 0, |
54 | | - 'indent': 0, |
55 | | - 'function-paren-newline': 0, |
56 | | - 'object-curly-newline': 0, |
57 | | - 'react/jsx-indent': 0, |
58 | | - 'react/prop-types': 0, |
59 | | - 'react/forbid-prop-types': 0, |
| 54 | + "jsx-a11y/click-events-have-key-events": 0, |
| 55 | + "jsx-a11y/label-has-associated-control": 0, |
| 56 | + "jsx-a11y/label-has-for": 0, |
| 57 | + "jsx-a11y/no-static-element-interactions": 0, |
| 58 | + "prefer-template": 0, |
| 59 | + indent: 0, |
| 60 | + "function-paren-newline": 0, |
| 61 | + "object-curly-newline": 0, |
| 62 | + "react/jsx-indent": 0, |
| 63 | + "react/prop-types": 0, |
| 64 | + "react/forbid-prop-types": 0, |
60 | 65 |
|
61 | 66 | // For importing react-lifecycle-visualizer from /src instead of /node_modules: |
62 | | - 'import/no-unresolved': [2, { ignore: ['^react-lifecycle-visualizer$'] }], |
63 | | - 'import/extensions': [2, 'ignorePackages'], |
| 67 | + "import/no-unresolved": [2, { ignore: ["^react-lifecycle-visualizer$"] }], |
| 68 | + "import/extensions": [2, "ignorePackages"] |
64 | 69 | } |
65 | 70 | }; |
0 commit comments