40 lines
		
	
	
		
			836 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			836 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
// @ts-check
 | 
						|
import { FlatCompat } from '@eslint/eslintrc';
 | 
						|
import tseslint from 'typescript-eslint';
 | 
						|
 | 
						|
const compat = new FlatCompat({
 | 
						|
  baseDirectory: import.meta.dirname,
 | 
						|
});
 | 
						|
 | 
						|
export default [
 | 
						|
  // Global ignores
 | 
						|
  {
 | 
						|
    ignores: [
 | 
						|
      'node_modules/**',
 | 
						|
      '.next/**',
 | 
						|
      'out/**',
 | 
						|
      'build/**',
 | 
						|
      'next-env.d.ts',
 | 
						|
      '*.mjs',
 | 
						|
      'tailwind.config.ts',
 | 
						|
    ],
 | 
						|
  },
 | 
						|
 | 
						|
  // 1. Next.js core rules (includes react, react-hooks, and next)
 | 
						|
  ...compat.extends('next/core-web-vitals', 'prettier'),
 | 
						|
 | 
						|
  // 2. Your strict, type-aware TypeScript rules
 | 
						|
  ...tseslint.configs.strictTypeChecked,
 | 
						|
  ...tseslint.configs.stylisticTypeChecked,
 | 
						|
 | 
						|
  // 3. Configuration for type-aware rules
 | 
						|
  {
 | 
						|
    languageOptions: {
 | 
						|
      parserOptions: {
 | 
						|
        project: true,
 | 
						|
        tsconfigRootDir: import.meta.dirname,
 | 
						|
      },
 | 
						|
    },
 | 
						|
  },
 | 
						|
];
 |