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 36
36
"node" : " >=18.18.0"
37
37
},
38
38
"scripts" : {
39
- "build" : " nr typegen && tsup" ,
39
+ "build" : " nr build: typegen && tsup" ,
40
40
"dev" : " tsup --format esm,cjs --watch & npx @eslint/config-inspector" ,
41
41
"lint" : " eslint ." ,
42
42
"lint:fix" : " eslint . --fix" ,
43
43
"build:inspector" : " pnpm build && npx @eslint/config-inspector build" ,
44
- "typegen" : " tsx scripts/typegen.ts" ,
44
+ "build: typegen" : " tsx scripts/typegen.ts" ,
45
45
"prepack" : " nr build" ,
46
46
"prepare" : " simple-git-hooks" ,
47
47
"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'
2
2
import { flatConfigsToRulesDTS } from 'eslint-typegen/core'
3
3
import { builtinRules } from 'eslint/use-at-your-own-risk'
4
+ import picocolors from 'picocolors'
4
5
import {
5
6
command ,
6
7
comments ,
@@ -69,4 +70,6 @@ dts += `
69
70
export type ConfigNames = ${ configNames . map ( i => `'${ i } '` ) . join ( ' | ' ) }
70
71
`
71
72
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