File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
import picomatch from 'picomatch' ;
2
- import { ConfigurationValidator } from './ConfigurationValidator.js' ;
3
2
import { partitionCompilers } from './compilers/index.js' ;
4
3
import { DEFAULT_EXTENSIONS , KNIP_CONFIG_LOCATIONS , ROOT_WORKSPACE_NAME } from './constants.js' ;
5
4
import { defaultRules } from './issues/initializers.js' ;
5
+ import { knipConfigurationSchema } from './schema/configuration.js' ;
6
6
import { type PluginName , pluginNames } from './types/PluginNames.js' ;
7
7
import type {
8
8
Configuration ,
@@ -153,7 +153,7 @@ export class ConfigurationChief {
153
153
: manifest . knip ;
154
154
155
155
// Have to partition compiler functions before Zod touches them
156
- const parsedConfig = this . rawConfig ? ConfigurationValidator . parse ( partitionCompilers ( this . rawConfig ) ) : { } ;
156
+ const parsedConfig = this . rawConfig ? knipConfigurationSchema . parse ( partitionCompilers ( this . rawConfig ) ) : { } ;
157
157
this . config = this . normalize ( parsedConfig ) ;
158
158
159
159
await this . setWorkspaces ( ) ;
Original file line number Diff line number Diff line change 1
1
import { z } from 'zod' ;
2
- import { globSchema , pluginsSchema } from './schema/ plugins.js' ;
2
+ import { globSchema , pluginsSchema } from './plugins.js' ;
3
3
4
4
const pathsSchema = z . record ( z . string ( ) , z . array ( z . string ( ) ) ) ;
5
5
@@ -85,7 +85,7 @@ const workspacesConfigurationSchema = z.object({
85
85
workspaces : z . record ( z . string ( ) , workspaceConfigurationSchema ) . optional ( ) ,
86
86
} ) ;
87
87
88
- export const ConfigurationValidator = rootConfigurationSchema
88
+ export const knipConfigurationSchema = rootConfigurationSchema
89
89
. merge ( reportConfigSchema )
90
90
. merge ( workspacesConfigurationSchema )
91
91
. merge ( pluginsSchema . partial ( ) ) ;
Original file line number Diff line number Diff line change 1
1
import type { z } from 'zod' ;
2
- import type { ConfigurationValidator } from '../ConfigurationValidator.js' ;
3
2
import type { AsyncCompilers , SyncCompilers } from '../compilers/types.js' ;
3
+ import type { knipConfigurationSchema } from '../schema/configuration.js' ;
4
4
import type { pluginSchema } from '../schema/plugins.js' ;
5
5
import type { Input } from '../util/input.js' ;
6
6
import type { PluginName } from './PluginNames.js' ;
@@ -32,7 +32,7 @@ export interface BinaryResolverOptions extends GetInputsFromScriptsOptions {
32
32
33
33
export type BinaryResolver = ( binary : string , args : string [ ] , options : BinaryResolverOptions ) => Input [ ] ;
34
34
35
- export type RawConfiguration = z . infer < typeof ConfigurationValidator > ;
35
+ export type RawConfiguration = z . infer < typeof knipConfigurationSchema > ;
36
36
37
37
export type RawPluginConfiguration = z . infer < typeof pluginSchema > ;
38
38
You can’t perform that action at this time.
0 commit comments