Skip to content

Linter.FlatConfig type is deprecated #391

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

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

Linter.FlatConfig type is deprecated #391

roottool opened this issue Jan 30, 2025 · 1 comment

Comments

@roottool
Copy link

Plugin version

v5.5.0

What problem do you want to solve?

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

"flat/all": Linter.FlatConfig;
"flat/recommended": Linter.FlatConfig;

Expected behavior

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?

This is the same content as testing-library/eslint-plugin-testing-library#985.

@G-Rath
Copy link
Collaborator

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).

@G-Rath G-Rath closed this as not planned Won't fix, can't repro, duplicate, stale Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants