File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
import type { TypedFlatConfigItem } from '../types'
2
-
2
+ import { hasFile } from '../utils'
3
3
import { jsoncParser , pnpmPlugin , yamlParser } from '../vendors'
4
4
5
+ const hasWorkspace = hasFile ( 'pnpm-workspace.yaml' ) || hasFile ( 'pnpm-workspace.yml' )
6
+
5
7
export function pnpm ( ) : TypedFlatConfigItem [ ] {
6
8
return [
7
9
{
@@ -11,7 +13,7 @@ export function pnpm (): TypedFlatConfigItem[] {
11
13
name : 'vuetify/pnpm/package-json' ,
12
14
plugins : { pnpm : pnpmPlugin } ,
13
15
rules : {
14
- 'pnpm/json-prefer-workspace-settings' : 'error' ,
16
+ 'pnpm/json-prefer-workspace-settings' : hasWorkspace ? 'error' : 'off ',
15
17
'pnpm/json-valid-catalog' : 'error' ,
16
18
} ,
17
19
} ,
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export function loadAutoImports (options: Options['autoimports'] = true): TypedF
24
24
if ( ! autoImportModuleURL ) {
25
25
return { }
26
26
}
27
- return compat . extends ( autoImportModuleURL ) as TypedFlatConfigItem
27
+ return compat . extends ( autoImportModuleURL ) [ 0 ] ?? { }
28
28
} catch {
29
29
return { }
30
30
}
You can’t perform that action at this time.
0 commit comments