1
13693261870
2023-06-27 d2fe140059c57527295ca2ace422e42f5b95487c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
module.exports = {
  env: {
    browser: true,
    node: true,
    es6: true
  },
  parser: 'babel-eslint',
  plugins: [
    'html'
  ],
  extends: [
    'airbnb'
  ],
  rules: {
    'generator-star-spacing': 'off',
    'space-before-function-paren': 1, // 函数间的空格
    'no-irregular-whitespace': 'off',
    'no-unused-vars': 'off',
    'no-tabs': 'off',
    'no-console': 'off', // 允许console.log
    'react/sort-comp': 'off',
    'no-debugger': 'off',
    'no-param-reassign': ['error', 'always', { null: 'ignore' }], // 允许==
    // maximum line length
    'max-len': [1, {
      code: 160,
      tabWidth: 2,
      ignoreComments: true,
      ignoreUrls: true,
      ignoreTemplateLiterals: true,
      ignoreRegExpLiterals: true
    }],
    'no-return-await': 'off',
    'no-plusplus': 'off',
    'no-unused-expressions': 'off',
    'jsx-a11y/no-static-element-interactions': 'off',
    'comma-dangle': 'off',
    'import/no-extraneous-dependencies': ['error', {
      devDependencies: true,
      optionalDependencies: false,
      peerDependencies: false
    }],
    'global-require': [0],
    'react/prop-types': [0],
    'func-names': [0],
    'import/no-unresolved': [0],
    'no-undef': [0],
    'class-methods-use-this': [0],
    'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
    'react/prefer-stateless-function': 0,
    'react/self-closing-comp': 0,
    'react/no-array-index-key': 0,
    'implicit-arrow-linebreak': [0, 'brace-style'],
    'jsx-a11y/click-events-have-key-events': 0,
    'jsx-a11y/no-noninteractive-element-interactions': 0,
    'import/prefer-default-export': [0],
    'react/jsx-wrap-multilines': 0,
    'react/no-this-in-sfc': [0],
    'react/no-unused-state': [0],
    'arrow-parens': 0,
    'no-nested-ternary': 0,
    'consistent-return': [0],
    'react/jsx-closing-tag-location': [0],
    'jsx-a11y/no-noninteractive-tabindex': [0],
    'react/jsx-indent-props': [2, 2],
    'linebreak-style': 0,
    'react/jsx-closing-bracket-location': 0,
    'prefer-promise-reject-errors': 0,
    'no-restricted-syntax': 0,
    'import/no-cycle': 0,
    'react/jsx-props-no-spreading': 0
  }
};