|
1 | 1 | module.exports = {
|
2 |
| - "env": { |
3 |
| - "browser": true, |
4 |
| - "es6": true |
5 |
| - }, |
6 |
| - "extends": ["eslint:recommended", "react-app", "plugin:jsx-a11y/recommended"], |
7 |
| - "plugins": ["import","jsx-a11y"], |
8 |
| - "parserOptions": { |
9 |
| - "ecmaVersion": 2018, |
10 |
| - "sourceType": "module" |
11 |
| - }, |
12 |
| - "rules": { |
13 |
| - "no-console": "warn", |
14 |
| - "no-eval": "error", |
15 |
| - "import/first": "error" |
16 |
| - }, |
17 |
| - "overrides": [ |
18 |
| - { |
19 |
| - "files": ["__tests__/**/*.js(x)?"], |
20 |
| - "plugins": ["jest"], |
21 |
| - "env": { |
22 |
| - "jest": true |
23 |
| - } |
24 |
| - } |
25 |
| - ] |
| 2 | + extends: [ |
| 3 | + 'react-app', |
| 4 | + 'eslint:recommended', |
| 5 | + 'plugin:react/recommended', |
| 6 | + 'plugin:jsx-a11y/recommended', |
| 7 | + ], |
| 8 | + overrides: [ |
| 9 | + { |
| 10 | + env: { |
| 11 | + jest: true |
| 12 | + }, |
| 13 | + files: ['__tests__/**/*.js(x)?'], |
| 14 | + plugins: ['jest'], |
| 15 | + } |
| 16 | + ], |
| 17 | + parserOptions: { |
| 18 | + ecmaVersion: 2018, |
| 19 | + sourceType: 'module' |
| 20 | + }, |
| 21 | + plugins: [ |
| 22 | + 'import', |
| 23 | + 'jsx-a11y', |
| 24 | + 'react', |
| 25 | + 'eslint-plugin-no-inline-styles' |
| 26 | + ], |
| 27 | + rules: { |
| 28 | + 'array-callback-return': 'error', |
| 29 | + eqeqeq: 'error', |
| 30 | + 'import/first': 'error', |
| 31 | + indent: ['error', 4], |
| 32 | + 'keyword-spacing': ['error', { after: true, before: true }], |
| 33 | + 'no-console': 'warn', |
| 34 | + 'no-eval': 'error', |
| 35 | + // 'no-inline-styles/no-inline-styles': ['error'], |
| 36 | + 'no-new-object': 'error', |
| 37 | + 'no-unused-vars': 'error', |
| 38 | + 'no-var': ['error'], |
| 39 | + 'prefer-template': ['error'], |
| 40 | + 'quote-props': ['error', 'as-needed'], |
| 41 | + quotes: ['error', 'single'], |
| 42 | + 'react/jsx-curly-spacing': ['error', {allowMultiline: true, when: 'always'}], |
| 43 | + 'react/jsx-equals-spacing': ['error', 'never'], |
| 44 | + 'react/no-unknown-property': ['error'], |
| 45 | + semi: ['error', 'never'], |
| 46 | + // 'sort-keys': ['error', 'asc', {caseSensitive: true, minKeys: 2, natural: false}], |
| 47 | + }, |
| 48 | + |
26 | 49 | }
|
0 commit comments