.eslintrc.js 927 B

123456789101112131415161718192021222324252627282930313233
  1. module.exports = {
  2. parser: 'babel-eslint',
  3. extends: ['airbnb', 'prettier', 'plugin:compat/recommended'],
  4. env: {
  5. browser: true,
  6. node: true,
  7. es6: true,
  8. mocha: true,
  9. jest: true,
  10. jasmine: true,
  11. },
  12. globals: {
  13. APP_TYPE: true,
  14. page: true,
  15. },
  16. rules: {
  17. 'react/jsx-filename-extension': [1, { extensions: ['.js'] }],
  18. 'react/jsx-wrap-multilines': 0,
  19. 'react/prop-types': 0,
  20. 'react/forbid-prop-types': 0,
  21. 'react/jsx-one-expression-per-line': 0,
  22. 'import/no-unresolved': [2, { ignore: ['^@/', '^umi/'] }],
  23. 'import/no-extraneous-dependencies': [2, { optionalDependencies: true }],
  24. 'jsx-a11y/no-noninteractive-element-interactions': 0,
  25. 'jsx-a11y/click-events-have-key-events': 0,
  26. 'jsx-a11y/no-static-element-interactions': 0,
  27. 'jsx-a11y/anchor-is-valid': 0,
  28. 'linebreak-style': 0,
  29. },
  30. settings: {
  31. polyfills: ['fetch', 'promises', 'url'],
  32. },
  33. };