jsx-eslint / eslint-plugin-jsx-a11y

Static AST checker for a11y rules on JSX elements.
MIT License
3.42k stars 637 forks source link

Invalid types for @types/eslint-plugin-jsx-a11y #1010

Open nbouvrette opened 2 months ago

nbouvrette commented 2 months ago

I tried to install @types/eslint-plugin-jsx-a11y because eslint-plugin-jsx-a11y isn't provided with types and I am getting build errors:

node_modules/@types/eslint-plugin-jsx-a11y/index.d.ts:5:29 - error TS2694: Namespace '"/example/node_modules/@types/eslint/index".Linter' has no exported member 'LegacyConfig'.

5         recommended: Linter.LegacyConfig;

Are those types still supported? is there a way to get types? The only solution I found for now was to disable types

ljharb commented 2 months ago

The DT package is entirely distinct, and I don't maintain them (altho I'm happy to review PRs that bring them up to date)

It seems like perhaps the DT package requires eslint 7 or 8, and you might be using eslint 8 or 9?

michaelfaith commented 1 month ago

Which version of @types/eslint do you have installed? It looks like the latest @types/eslint-plugin-jsx-a11y is based on the v9 (or possibly 8.57) @types/eslint

@types/eslint-plugin-jsx-a11y 6.9.0 image

@types/eslint 9.6.1 image