eslint.config.mjs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { defineConfig, globalIgnores } from 'eslint/config';
  2. import nextVitals from 'eslint-config-next/core-web-vitals';
  3. import nextTs from 'eslint-config-next/typescript';
  4. const eslintConfig = defineConfig([
  5. ...nextVitals,
  6. ...nextTs,
  7. // Override default ignores of eslint-config-next.
  8. globalIgnores([
  9. // Default ignores of eslint-config-next:
  10. '.next/**',
  11. 'out/**',
  12. 'build/**',
  13. 'next-env.d.ts',
  14. // Vendored/generated code:
  15. 'packages/**',
  16. // Claude Code local files:
  17. '.claude/**',
  18. '.superpowers/**',
  19. '.worktrees/**',
  20. // Playwright e2e tests (not React code):
  21. 'e2e/**',
  22. ]),
  23. {
  24. rules: {
  25. // Dynamic AI-generated image URLs from various providers are incompatible
  26. // with next/image (requires known dimensions and whitelisted domains).
  27. '@next/next/no-img-element': 'off',
  28. // Allow unused vars/args prefixed with _ (common convention for intentionally
  29. // unused destructured values, callback params, etc.)
  30. '@typescript-eslint/no-unused-vars': [
  31. 'warn',
  32. {
  33. argsIgnorePattern: '^_',
  34. varsIgnorePattern: '^_',
  35. caughtErrorsIgnorePattern: '^_',
  36. destructuredArrayIgnorePattern: '^_',
  37. },
  38. ],
  39. },
  40. },
  41. ]);
  42. export default eslintConfig;