Skip to content

Commit

Permalink
fix: prevent eslint and typescript from being overly worried about re…
Browse files Browse the repository at this point in the history
…plicant schemas
  • Loading branch information
Alex Van Camp committed Jun 11, 2023
1 parent 3825127 commit 3d2dd82
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/commands/schema-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,16 @@ function action(inDir: string, cmd: { outDir: string; configSchema: boolean }) {
return promise;
};

const indexFiles = [];
const indexFiles = ['/* eslint-disable */'];

if (fs.existsSync(configSchemaPath) && cmd.configSchema) {
compile(configSchemaPath, path.resolve(outDir, 'configschema.d.ts'));
indexFiles.push('// @ts-ignore')
indexFiles.push(`export * from './configschema';`);
}

for (const schema of schemas) {
indexFiles.push('// @ts-ignore');
indexFiles.push(`export * from './${schema.replace(/\.json$/i, '')}';`);

compile(
Expand Down

0 comments on commit 3d2dd82

Please sign in to comment.