Skip to content

Commit

Permalink
fix(eslint-plugin): strictly type config keys (TanStack#7780)
Browse files Browse the repository at this point in the history
* fix(eslint-plugin): strictly type config keys

* fix: remove union for `recommended`
  • Loading branch information
favna authored Jul 25, 2024
1 parent 5760f70 commit 55486f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/eslint-plugin-query/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ type RuleKey = keyof typeof rules

interface Plugin extends Omit<ESLint.Plugin, 'rules'> {
rules: Record<RuleKey, RuleModule<any, any, any>>
configs: Record<
'recommended' | 'flat/recommended',
ESLint.ConfigData | Linter.FlatConfig | Array<Linter.FlatConfig>
>
configs: {
recommended: ESLint.ConfigData
'flat/recommended': Array<Linter.FlatConfig>
}
}

const plugin: Plugin = {
Expand Down

0 comments on commit 55486f1

Please sign in to comment.