File tree 1 file changed +6
-3
lines changed
packages/eslint-config/src/flat/configs
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
- import { join , relative } from 'pathe'
1
+ import { join } from 'pathe'
2
2
import { GLOB_EXTS } from '../constants'
3
3
import type { FlatConfig , NuxtESLintConfigOptions } from '../types'
4
4
@@ -7,8 +7,11 @@ export default function disables(options: NuxtESLintConfigOptions): FlatConfig[]
7
7
const nestedGlobPattern = `**/*.${ GLOB_EXTS } `
8
8
9
9
const fileRoutes = [
10
- relative ( dirs . src || '' , `app.${ GLOB_EXTS } ` ) ,
11
- relative ( dirs . src || '' , `error.${ GLOB_EXTS } ` ) ,
10
+ // These files must have one-word names as they have a special meaning in Nuxt.
11
+ ...dirs . layers ?. flatMap ( layersDir => [
12
+ join ( layersDir , `app.${ GLOB_EXTS } ` ) ,
13
+ join ( layersDir , `error.${ GLOB_EXTS } ` ) ,
14
+ ] ) || [ ] ,
12
15
13
16
// Layouts and pages are not used directly by users so they can have one-word names.
14
17
...( dirs . layouts ?. map ( layoutsDir => join ( layoutsDir , nestedGlobPattern ) ) || [ ] ) ,
You can’t perform that action at this time.
0 commit comments