12345678910111213141516171819202122232425262728293031323334353637 |
- // eslint-disable-next-line no-undef
- module.exports = {
- // eslint-disable-next-line no-undef
- extends: [require.resolve('@umijs/fabric/dist/eslint')],
- globals: {
- ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true,
- page: true,
- 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
- }
- }
|