File tree Expand file tree Collapse file tree 3 files changed +293
-285
lines changed
tests/smoke/basic/pre-built Expand file tree Collapse file tree 3 files changed +293
-285
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,12 @@ import type {
3333import type { CollectFn } from './utils/types.js' ;
3434import type { JSONSchema } from 'json-schema-to-ts' ;
3535
36- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
37- // @ts -ignore FIXME: remove this once we remove `theme` from the schema
38- delete rootRedoclyConfigSchema . properties . theme ;
36+ // FIXME: remove this once we remove `theme` from the schema
37+ const { theme : _ , ...propertiesWithoutTheme } = rootRedoclyConfigSchema . properties ;
38+ const redoclyConfigSchemaWithoutTheme = {
39+ ...rootRedoclyConfigSchema ,
40+ properties : propertiesWithoutTheme ,
41+ } ;
3942
4043export async function lint ( opts : {
4144 ref : string ;
@@ -150,7 +153,7 @@ export async function lintConfig(opts: {
150153 } ;
151154
152155 const types = normalizeTypes (
153- opts . externalConfigTypes || createConfigTypes ( rootRedoclyConfigSchema , config )
156+ opts . externalConfigTypes || createConfigTypes ( redoclyConfigSchemaWithoutTheme , config )
154157 ) ;
155158
156159 const rules : ( RuleInstanceConfig & {
Original file line number Diff line number Diff line change @@ -476,9 +476,14 @@ const CoreConfigTypes: Record<string, NodeType> = {
476476 AssertionDefinitionAssertions,
477477} ;
478478
479- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
480- // @ts -ignore FIXME: remove this once we remove `theme` from the schema
481- delete rootRedoclyConfigSchema . properties . theme ;
479+ // FIXME: remove this once we remove `theme` from the schema
480+ const { theme : _ , ...propertiesWithoutTheme } = rootRedoclyConfigSchema . properties ;
481+ const redoclyConfigSchemaWithoutTheme = {
482+ ...rootRedoclyConfigSchema ,
483+ properties : propertiesWithoutTheme ,
484+ } ;
482485
483- export const ConfigTypes : Record < string , NodeType > = createConfigTypes ( rootRedoclyConfigSchema ) ;
486+ export const ConfigTypes : Record < string , NodeType > = createConfigTypes (
487+ redoclyConfigSchemaWithoutTheme
488+ ) ;
484489export const NormalizedConfigTypes = normalizeTypes ( ConfigTypes ) ;
You can’t perform that action at this time.
0 commit comments