Skip to content

Commit

Permalink
fix(eslint): add error handling to DTS generation script
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Jan 5, 2025
1 parent 4d53243 commit a7d6d04
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/eslint/scripts/generateDts.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ while (true) {
dir = parentDir;
}

const { generate } = require('../lib/dtsGenerate.js');
const dts = generate(nodeModulesDirs);
try {
const { generate } = require('../lib/dtsGenerate.js');
const dts = generate(nodeModulesDirs);

fs.writeFileSync(path.resolve(__dirname, '..', 'lib', 'types.d.ts'), dts);
fs.writeFileSync(path.resolve(__dirname, '..', 'lib', 'types.d.ts'), dts);
} catch { }

0 comments on commit a7d6d04

Please sign in to comment.