Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(schema): add declarations to ignore list (#8787)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Nov 9, 2022
1 parent 30d9947 commit 4e8f59b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/kit/src/resolve.ts
Expand Up @@ -83,7 +83,7 @@ export async function resolvePath (path: string, opts: ResolvePathOptions = {}):
/**
* Try to resolve first existing file in paths
*/
export async function findPath (paths: string|string[], opts?: ResolvePathOptions, pathType: 'file' | 'dir' = 'file'): Promise<string|null> {
export async function findPath (paths: string | string[], opts?: ResolvePathOptions, pathType: 'file' | 'dir' = 'file'): Promise<string | null> {
if (!Array.isArray(paths)) {
paths = [paths]
}
Expand All @@ -110,8 +110,8 @@ export function resolveAlias (path: string, alias?: Record<string, string>): str
}

export interface Resolver {
resolve(...path: string[]): string
resolvePath(path: string, opts?: ResolvePathOptions): Promise<string>
resolve (...path: string[]): string
resolvePath (path: string, opts?: ResolvePathOptions): Promise<string>
}

/**
Expand Down
1 change: 1 addition & 0 deletions packages/schema/src/config/common.ts
Expand Up @@ -338,6 +338,7 @@ export default defineUntypedSchema({
$resolve: async (val, get) => [
'**/*.stories.{js,ts,jsx,tsx}', // ignore storybook files
'**/*.{spec,test}.{js,ts,jsx,tsx}', // ignore tests
'**/*.d.ts', // ignore type declarations
'.output',
await get('ignorePrefix') && `**/${await get('ignorePrefix')}*.*`
].concat(val).filter(Boolean)
Expand Down
2 changes: 2 additions & 0 deletions test/fixtures/basic/plugins/test.d.ts
@@ -0,0 +1,2 @@
interface MyInterface {}
export {}

0 comments on commit 4e8f59b

Please sign in to comment.