eslint.config.mjs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import nextConfig from 'eslint-config-next';
  2. import { fileURLToPath } from 'node:url';
  3. export default [
  4. {
  5. ignores: [
  6. '**/node_modules/**',
  7. '**/.next/**',
  8. '**/.expo/**',
  9. '**/ios/**',
  10. '**/android/**',
  11. '**/next-env.d.ts',
  12. '**/uniwind-types.d.ts',
  13. '**/md4c-emscripten.cjs',
  14. ],
  15. },
  16. ...nextConfig,
  17. {
  18. settings: { next: { rootDir: fileURLToPath(new URL('./apps/next/', import.meta.url)) } },
  19. rules: {
  20. 'no-unused-vars': ['warn', { args: 'none', caughtErrors: 'none', ignoreRestSiblings: true }],
  21. },
  22. },
  23. {
  24. files: ['**/*.{ts,tsx}'],
  25. rules: {
  26. 'no-unused-vars': 'off',
  27. '@typescript-eslint/no-unused-vars': ['warn', { args: 'none', caughtErrors: 'none', ignoreRestSiblings: true }],
  28. },
  29. },
  30. {
  31. files: ['packages/app/**/*.{js,jsx,ts,tsx}', 'apps/expo/**/*.{js,jsx,ts,tsx}'],
  32. rules: {
  33. // Shared/native components use UNA's module prop and platform image atoms.
  34. '@next/next/no-assign-module-variable': 'off',
  35. '@next/next/no-img-element': 'off',
  36. '@next/next/no-html-link-for-pages': 'off',
  37. },
  38. },
  39. ];