61 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import js from '@eslint/js';
 | 
						|
import tseslint from 'typescript-eslint';
 | 
						|
import nextPlugin from '@next/eslint-plugin-next';
 | 
						|
 | 
						|
export default tseslint.config(
 | 
						|
  // Base recommended configs
 | 
						|
  js.configs.recommended,
 | 
						|
 | 
						|
  // Next.js recommended configs
 | 
						|
  {
 | 
						|
    plugins: {
 | 
						|
      '@next/next': nextPlugin,
 | 
						|
    },
 | 
						|
    rules: {
 | 
						|
      ...nextPlugin.configs.recommended.rules,
 | 
						|
      ...nextPlugin.configs['core-web-vitals'].rules,
 | 
						|
    },
 | 
						|
  },
 | 
						|
 | 
						|
  // TypeScript configs
 | 
						|
  ...tseslint.configs.recommended,
 | 
						|
  ...tseslint.configs.strictTypeChecked,
 | 
						|
  ...tseslint.configs.stylisticTypeChecked,
 | 
						|
 | 
						|
  // Project-specific configuration
 | 
						|
  {
 | 
						|
    languageOptions: {
 | 
						|
      parserOptions: {
 | 
						|
        projectService: true,
 | 
						|
        tsconfigRootDir: import.meta.dirname,
 | 
						|
      },
 | 
						|
    },
 | 
						|
  },
 | 
						|
 | 
						|
  // Next.js specific overrides
 | 
						|
  {
 | 
						|
    files: ['**/*.{js,jsx,ts,tsx}'],
 | 
						|
    rules: {
 | 
						|
      // Next.js already handles React imports
 | 
						|
      '@typescript-eslint/no-unused-vars': [
 | 
						|
        'error',
 | 
						|
        {
 | 
						|
          argsIgnorePattern: '^_',
 | 
						|
          varsIgnorePattern: '^_',
 | 
						|
        },
 | 
						|
      ],
 | 
						|
    },
 | 
						|
  },
 | 
						|
 | 
						|
  // Config files don't need strict type checking
 | 
						|
  {
 | 
						|
    files: ['**/*.config.{js,ts,mjs}', 'tailwind.config.{js,ts}'],
 | 
						|
    ...tseslint.configs.disableTypeChecked,
 | 
						|
  },
 | 
						|
 | 
						|
  // Ignore build outputs and dependencies
 | 
						|
  {
 | 
						|
    ignores: ['.next/**', 'node_modules/**', 'dist/**', 'build/**', 'drizzle/**/*.sql'],
 | 
						|
  },
 | 
						|
);
 |