.eslintrc.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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': [
  24. 2,
  25. {
  26. optionalDependencies: true,
  27. devDependencies: ['**/tests/**.js', '/mock/**.js', '**/**.test.js'],
  28. },
  29. ],
  30. 'jsx-a11y/no-noninteractive-element-interactions': 0,
  31. 'jsx-a11y/click-events-have-key-events': 0,
  32. 'jsx-a11y/no-static-element-interactions': 0,
  33. 'jsx-a11y/anchor-is-valid': 0,
  34. 'linebreak-style': 0,
  35. },
  36. settings: {
  37. polyfills: ['fetch', 'promises', 'url'],
  38. },
  39. };