1234567891011121314151617181920212223242526272829303132333435363738 |
- module.exports = {
- extends: require.resolve('@umijs/max/eslint'),
- globals: {
- REACT_APP_ENV: true
- },
- rules: {
- semi: ['error', 'never'],
- 'no-multiple-empty-lines': [1, { max: 2 }],
- 'no-use-before-define': 'off',
- 'comma-dangle': [2, 'never'],
- 'react/prop-types': 0,
- 'spaced-comment': 'error',
- 'react/no-array-index-key': 0,
- // 'array-bracket-spacing': ['error', 'always'], // 和prettier冲突
- 'object-curly-spacing': ['error', 'always'],
- // 'no-use-before-define': ['error', { functions: false }], // 允许在未定义function前调用
- 'react/self-closing-comp': [
- 'error',
- {
- component: true,
- html: true
- }
- ],
- 'react-hooks/exhaustive-deps': 0,
- 'no-unused-expressions': [
- 'error',
- {
- allowShortCircuit: true
- }
- ],
- '@typescript-eslint/no-unused-expressions': 0
- },
- settings: {
- react: {
- version: 'detect'
- }
- }
- }
|