.eslintrc.js 760 B

12345678910111213141516171819202122232425262728293031
  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': [
  17. 'error',
  18. {
  19. component: true,
  20. html: true
  21. }
  22. ],
  23. 'react-hooks/exhaustive-deps': 0,
  24. 'no-unused-expressions': [
  25. 'error',
  26. {
  27. allowShortCircuit: true
  28. }
  29. ]
  30. }
  31. }