|
1 | 1 | module.exports = { |
2 | | - extends: ['airbnb', 'plugin:react/recommended', 'prettier', 'prettier/react'], |
3 | | - plugins: ['prettier', 'react', 'cypress', 'react-hooks'], |
4 | | - parser: 'babel-eslint', |
5 | | - parserOptions: { |
6 | | - ecmaVersion: 2016, |
7 | | - sourceType: 'module', |
8 | | - ecmaFeatures: { |
9 | | - jsx: true, |
10 | | - }, |
11 | | - }, |
12 | | - env: { |
13 | | - es6: true, |
14 | | - node: true, |
15 | | - jest: true, |
16 | | - 'cypress/globals': true, |
17 | | - }, |
18 | | - settings: { |
19 | | - 'import/resolver': { |
20 | | - 'babel-module': {}, |
21 | | - }, |
22 | | - }, |
23 | | - rules: { |
24 | | - // import/resolver 暂时识别不了 @xxx, 暂时关闭该检测 |
25 | | - 'import/no-extraneous-dependencies': 0, |
26 | | - 'arrow-body-style': 0, |
27 | | - // need for _store init |
28 | | - 'no-underscore-dangle': 0, |
29 | | - // heavilly used in store.actions |
30 | | - 'no-param-reassign': 0, |
31 | | - // heavilly used in store.views |
32 | | - 'no-use-before-define': 0, |
33 | | - // force-return is unneeded |
34 | | - 'consistent-return': 0, |
35 | | - 'no-shadow': 0, |
36 | | - // error could be object for parse by upfloor |
37 | | - 'prefer-promise-reject-errors': 0, |
38 | | - 'react/jsx-no-bind': 0, |
39 | | - // allow JSX in js files |
40 | | - 'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }], |
41 | | - 'react/forbid-prop-types': 0, |
42 | | - // no need sort |
43 | | - 'react/sort-comp': 0, |
44 | | - 'react/prop-types': [1, { skipUndeclared: true }], |
45 | | - 'jsx-a11y/href-no-hash': 'off', |
46 | | - 'jsx-a11y/no-static-element-interactions': 0, |
47 | | - 'jsx-a11y/click-events-have-key-events': 0, |
48 | | - |
49 | | - // for cypress test usage |
50 | | - 'no-unused-expressions': 0, |
51 | | - |
52 | | - 'prettier/prettier': [ |
53 | | - 'error', |
54 | | - { |
55 | | - singleQuote: true, |
56 | | - semi: false, |
57 | | - tabWidth: 2, |
58 | | - bracketSpacing: true, |
59 | | - trailingComma: 'es5', |
60 | | - }, |
61 | | - ], |
62 | | - 'react-hooks/rules-of-hooks': 'error', |
63 | | - 'react-hooks/exhaustive-deps': 'warn', |
64 | | - }, |
| 2 | + extends: ['@groupher/eslint-config-web'], |
65 | 3 | } |
0 commit comments