recommended.js 624 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * The basics.
  3. * @type {Object}
  4. */
  5. module.exports = {
  6. plugins: ['import'],
  7. rules: {
  8. // analysis/correctness
  9. 'import/no-unresolved': 'error',
  10. 'import/named': 'error',
  11. 'import/namespace': 'error',
  12. 'import/default': 'error',
  13. 'import/export': 'error',
  14. // red flags (thus, warnings)
  15. 'import/no-named-as-default': 'warn',
  16. 'import/no-named-as-default-member': 'warn',
  17. 'import/no-duplicates': 'warn',
  18. },
  19. // need all these for parsing dependencies (even if _your_ code doesn't need
  20. // all of them)
  21. parserOptions: {
  22. sourceType: 'module',
  23. ecmaVersion: 2018,
  24. },
  25. };