File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/plugin-typescript/src/lib Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11import { createRequire } from 'node:module' ;
22import type { PluginConfig } from '@code-pushup/models' ;
3+ import { stringifyError } from '@code-pushup/utils' ;
34import { DEFAULT_TS_CONFIG , TYPESCRIPT_PLUGIN_SLUG } from './constants.js' ;
45import { createRunnerFunction } from './runner/runner.js' ;
56import type { DiagnosticsOptions } from './runner/ts-runner.js' ;
@@ -11,7 +12,7 @@ const packageJson = createRequire(import.meta.url)(
1112 '../../package.json' ,
1213) as typeof import ( '../../package.json' ) ;
1314
14- export type FilterOptions = { onlyAudits ?: AuditSlug [ ] | undefined } ;
15+ export type FilterOptions = { onlyAudits ?: AuditSlug [ ] } ;
1516export type TypescriptPluginOptions = Partial < DiagnosticsOptions > &
1617 FilterOptions ;
1718
@@ -48,10 +49,10 @@ function parseOptions(
4849 tsPluginOptions : TypescriptPluginOptions ,
4950) : TypescriptPluginOptions {
5051 try {
51- return typescriptPluginConfigSchema . parse ( tsPluginOptions ) ;
52+ return typescriptPluginConfigSchema . parse ( tsPluginOptions ) as FilterOptions ;
5253 } catch ( error ) {
5354 throw new Error (
54- `Error parsing TypeScript Plugin options: ${ ( error as Error ) . message } ` ,
55+ `Error parsing TypeScript Plugin options: ${ stringifyError ( error ) } ` ,
5556 ) ;
5657 }
5758}
You can’t perform that action at this time.
0 commit comments