Skip to content

Commit

Permalink
fix: type declarations for configs (#2566)
Browse files Browse the repository at this point in the history
  • Loading branch information
thor-juhasz authored Oct 11, 2024
1 parent a91ae04 commit ba6a1d4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
33 changes: 15 additions & 18 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
type ConfigName =
| "base"
| "essential"
| "no-layout-rules"
| "recommended"
| "strongly-recommended"
| "vue3-essential"
| "vue3-recommended"
| "vue3-strongly-recommended"
| "flat/base"
| "flat/vue2-essential"
| "flat/vue2-recommended"
| "flat/vue2-strongly-recommended"
| "flat/essential"
| "flat/recommended"
| "flat/strongly-recommended"

declare const vue: {
meta: any
configs: {
[name in keyof ConfigName]: any
base: Linter.LegacyConfig
essential: Linter.LegacyConfig
'no-layout-rules': Linter.LegacyConfig
recommended: Linter.LegacyConfig
'strongly-recommended': Linter.LegacyConfig
'vue3-essential': Linter.LegacyConfig
'vue3-recommended': Linter.LegacyConfig
'vue3-strongly-recommended': Linter.LegacyConfig
'flat/base': Linter.FlatConfig[]
'flat/vue2-essential': Linter.FlatConfig[]
'flat/vue2-recommended': Linter.FlatConfig[]
'flat/vue2-strongly-recommended': Linter.FlatConfig[]
'flat/essential': Linter.FlatConfig[]
'flat/recommended': Linter.FlatConfig[]
'flat/strongly-recommended': Linter.FlatConfig[]
}
rules: Record<string, any>
processors: {
Expand Down
2 changes: 2 additions & 0 deletions typings/eslint/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ export class Linter {
export namespace Linter {
type LintMessage = ESLintLinter.LintMessage
type LintOptions = ESLintLinter.LintOptions
type LegacyConfig = ESLintLinter.LegacyConfig
type FlatConfig = ESLintLinter.FlatConfig
}
export type ReportDescriptorFix = (
fixer: Rule.RuleFixer
Expand Down

0 comments on commit ba6a1d4

Please sign in to comment.