File tree Expand file tree Collapse file tree 1 file changed +20
-19
lines changed
Expand file tree Collapse file tree 1 file changed +20
-19
lines changed Original file line number Diff line number Diff line change 1- import path from 'node:path' ;
2- import { globalIgnores } from 'eslint/config' ;
3- import { fileURLToPath } from 'node:url' ;
4- import { FlatCompat } from '@eslint/eslintrc' ;
5- import tseslint from 'typescript-eslint' ;
6- import baseConfig from '../../eslint.config.mjs' ;
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' ;
74
8- const __filename = fileURLToPath ( import . meta. url ) ;
9- const __dirname = path . dirname ( __filename ) ;
10- const compat = new FlatCompat ( {
11- baseDirectory : __dirname ,
12- } ) ;
13-
14- export default tseslint . config ( [
15- globalIgnores ( [ '**/.next/' , 'next-env.d.ts' , '**/_pagefind/' ] ) ,
16- ...baseConfig ,
17- ...compat . config ( {
18- extends : [ 'next/core-web-vitals' ] ,
5+ const eslintConfig = defineConfig ( [
6+ ...nextVitals ,
7+ ...nextTs ,
8+ {
199 settings : {
2010 next : {
21- rootDir : __dirname ,
11+ rootDir : 'packages/website/' ,
2212 } ,
2313 } ,
2414 rules : {
2515 'import/no-anonymous-default-export' : 'off' ,
2616 } ,
27- } ) ,
17+ } ,
18+ // Override default ignores of eslint-config-next.
19+ globalIgnores ( [
20+ // Default ignores of eslint-config-next:
21+ '.next/**' ,
22+ 'out/**' ,
23+ 'build/**' ,
24+ 'next-env.d.ts' ,
25+ 'public/_pagefind/**' ,
26+ ] ) ,
2827] ) ;
28+
29+ export default eslintConfig ;
You can’t perform that action at this time.
0 commit comments