.eslintrc.js 641 B

12345678910111213141516171819202122
  1. module.exports = {
  2. extends: [require.resolve('@umijs/fabric/dist/eslint')],
  3. globals: {
  4. ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true,
  5. page: true,
  6. REACT_APP_ENV: true
  7. },
  8. rules: {
  9. 'semi': ['error', 'never'],
  10. 'no-multiple-empty-lines': [1, { max: 2 }],
  11. 'comma-dangle': [2, 'never'],
  12. 'react/prop-types': 0,
  13. 'spaced-comment': 'error',
  14. // 'array-bracket-spacing': ['error', 'always'], // 和prettier冲突
  15. 'object-curly-spacing': ['error', 'always'],
  16. "react/self-closing-comp": ["error", {
  17. "component": true,
  18. "html": true
  19. }],
  20. 'react-hooks/exhaustive-deps': 0
  21. }
  22. }