Skip to content

Commit

Permalink
feat: generate types for core rules as well, resolve #439
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Mar 30, 2024
1 parent 9238901 commit 5ab92df
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 29 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@
"@antfu/eslint-config": "workspace:*",
"@antfu/eslint-plugin-prettier": "^5.0.1-1",
"@antfu/ni": "^0.21.12",
"@eslint/config-inspector": "^0.0.2",
"@eslint/config-inspector": "^0.1.0",
"@stylistic/eslint-plugin-migrate": "^1.7.0",
"@types/eslint": "^8.56.6",
"@types/fs-extra": "^11.0.4",
"@types/node": "^20.11.30",
"@types/node": "^20.12.2",
"@types/prompts": "^2.4.9",
"@types/yargs": "^17.0.32",
"@unocss/eslint-plugin": "^0.58.8",
Expand All @@ -142,7 +142,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.6",
"eslint-plugin-svelte": "2.36.0-next.13",
"eslint-typegen": "^0.1.6",
"eslint-typegen": "^0.2.0",
"esno": "^4.7.0",
"execa": "^8.0.1",
"fast-glob": "^3.3.2",
Expand Down
52 changes: 26 additions & 26 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions scripts/typegen.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import fs from 'node:fs/promises'
import { flatConfigsToRulesDTS } from 'eslint-typegen/core'
import { builtinRules } from 'eslint/use-at-your-own-risk'
import { astro, combine, comments, formatters, imports, javascript, jsdoc, jsonc, markdown, node, perfectionist, react, sortPackageJson, stylistic, svelte, test, toml, typescript, unicorn, unocss, vue, yaml } from '../src'

const configs = await combine(
{
plugins: {
'': {
rules: Object.fromEntries(builtinRules.entries()),
},
},
},
astro(),
comments(),
formatters(),
Expand Down

0 comments on commit 5ab92df

Please sign in to comment.