Generate types from ESLint rules schema
npm i eslint-typegen
import fs from 'node:fs/promises'
import { generateTypes } from 'eslint-typegen'
import pluginTs from '@typescript-eslint/eslint-plugin'
import pluginN from 'eslint-plugin-n'
const dts = await pluginsToRulesOptions({
'@typescript-eslint': pluginTs,
'n': pluginN,
})
await fs.writeFile('eslint-rules.d.ts', dts)
The initial idea comes from @Shinigami92 via this PR, thanks to him!
MIT License © 2023-PRESENT Anthony Fu