File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 3636 "node" : " >=18.18.0"
3737 },
3838 "scripts" : {
39- "build" : " nr typegen && tsup" ,
39+ "build" : " nr build: typegen && tsup" ,
4040 "dev" : " tsup --format esm,cjs --watch & npx @eslint/config-inspector" ,
4141 "lint" : " eslint ." ,
4242 "lint:fix" : " eslint . --fix" ,
4343 "build:inspector" : " pnpm build && npx @eslint/config-inspector build" ,
44- "typegen" : " tsx scripts/typegen.ts" ,
44+ "build: typegen" : " tsx scripts/typegen.ts" ,
4545 "prepack" : " nr build" ,
4646 "prepare" : " simple-git-hooks" ,
4747 "release" : " bumpp && pnpm publish" ,
Original file line number Diff line number Diff line change 1- import fs from 'node:fs/promises'
1+ import { writeFile } from 'node:fs/promises'
22import { flatConfigsToRulesDTS } from 'eslint-typegen/core'
33import { builtinRules } from 'eslint/use-at-your-own-risk'
4+ import picocolors from 'picocolors'
45import {
56 command ,
67 comments ,
@@ -69,4 +70,6 @@ dts += `
6970export type ConfigNames = ${ configNames . map ( i => `'${ i } '` ) . join ( ' | ' ) }
7071`
7172
72- await fs . writeFile ( 'src/types/typegen.d.ts' , dts )
73+ await writeFile ( 'src/types/typegen.d.ts' , dts )
74+
75+ console . log ( picocolors . green ( 'Type definitions generated!' ) )
You can’t perform that action at this time.
0 commit comments