feat: add linting option and implement linting for generated TypeScript files
This commit is contained in:
6
main.ts
6
main.ts
@@ -15,6 +15,7 @@ import {
|
||||
extractTagsWithOperations
|
||||
} from './src/generators/clean-arch.generator';
|
||||
import { generateReport } from './src/generators/report.generator';
|
||||
import { lintGeneratedFiles } from './src/generators/lint.generator';
|
||||
import { findEnvironmentFile, parseApiKeys } from './src/utils/environment-finder';
|
||||
import { askApiKeysForTags, askSelectionFilter } from './src/utils/prompt';
|
||||
import type { SelectionFilter } from './src/types';
|
||||
@@ -37,6 +38,7 @@ program
|
||||
.option('-t, --templates <dir>', 'Custom templates directory', path.join(__dirname, 'templates'))
|
||||
.option('--skip-install', 'Skip dependency installation')
|
||||
.option('--dry-run', 'Simulate without generating files')
|
||||
.option('--skip-lint', 'Skip post-generation linting and formatting')
|
||||
.option('-s, --select-endpoints', 'Interactively select which tags and endpoints to generate')
|
||||
.parse(process.argv);
|
||||
|
||||
@@ -132,6 +134,10 @@ async function main(): Promise<void> {
|
||||
);
|
||||
cleanup(tempDir);
|
||||
|
||||
if (!options.skipLint) {
|
||||
lintGeneratedFiles(options.output);
|
||||
}
|
||||
|
||||
const report = generateReport(options.output, analysis);
|
||||
|
||||
console.log('\n' + '='.repeat(60));
|
||||
|
||||
Reference in New Issue
Block a user