.eslintrc.cjs 765 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. module.exports = {
  2. root: true,
  3. parserOptions: {
  4. sourceType: 'module',
  5. ecmaVersion: 'latest',
  6. },
  7. extends: [
  8. 'eslint:recommended',
  9. 'plugin:editorconfig/noconflict',
  10. 'plugin:import/recommended',
  11. 'prettier',
  12. ],
  13. plugins: ['editorconfig', 'import'],
  14. ignorePatterns: ['*.cjs'],
  15. env: {
  16. browser: true,
  17. es2021: true,
  18. },
  19. globals: {
  20. Alpine: 'readonly',
  21. },
  22. rules: {
  23. 'no-unused-vars': [
  24. 'error',
  25. {
  26. argsIgnorePattern: '^_',
  27. varsIgnorePattern: '^_',
  28. caughtErrorsIgnorePattern: '^_',
  29. },
  30. ],
  31. 'import/order': [
  32. 'error',
  33. {
  34. groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'],
  35. },
  36. ],
  37. 'no-console': 'error',
  38. 'prefer-const': 'error',
  39. 'import/no-unresolved': 'off',
  40. },
  41. };