testing-library/eslint-plugin-testing-library

`Linter.FlatConfig` type is deprecated

Closed this issue · 1 comments

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

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