Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter.FlatConfig type is deprecated #985

Closed
roottool opened this issue Jan 30, 2025 · 1 comment
Closed

Linter.FlatConfig type is deprecated #985

roottool opened this issue Jan 30, 2025 · 1 comment
Labels
enhancement New feature or request triage Pending to be triaged by a maintainer

Comments

@roottool
Copy link

Plugin version

v7.1.1

What problem do you want to solve?

The Linter.FlatConfig type provided by ESLint is currently deprecated.

'flat/angular': Linter.FlatConfig;
'flat/dom': Linter.FlatConfig;
'flat/marko': Linter.FlatConfig;
'flat/react': Linter.FlatConfig;
'flat/svelte': Linter.FlatConfig;
'flat/vue': Linter.FlatConfig;

Your take on the correct solution?

The type definition will be converted from Linter.FlatConfig to Linter.Config.

[at]deprecated Use Config instead of FlatConfig
https://github.com/eslint/eslint/blob/8bcd820f37f2361e4f7261a9876f52d21bd9de8f/lib/types/index.d.ts#L1319

Anything else?

No response

Do you want to submit a pull request to implement this change?

Yes

@roottool roottool added enhancement New feature or request triage Pending to be triaged by a maintainer labels Jan 30, 2025
@G-Rath
Copy link
Contributor

G-Rath commented Jan 30, 2025

This type is being used on purpose for compatibility with both ESLint v8 and v9, as in the v8 types Linter.Config is an alias for the Linter.LegacyConfig whereas in v9 it's an alias for Linter.FlatConfig.

The type is deprecated only in v9, and it's usage will be replaced when support for ESLint v8 is dropped (which currently is not planned).

Also see #976

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage Pending to be triaged by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants