eslint-plugin-jsx-a11y works on ESLint 10 despite stale peer dependency range
The popular eslint-plugin-jsx-a11y declares peer dependency support only up to ESLint 9, causing npm to block installation alongside ESLint 10, yet all 39 of its rules run without errors on the newer version. By contrast, eslint-plugin-react shares a similarly outdated peer range but genuinely breaks on ESLint 10, with 38 of its 101 rules failing due to the removal of context.getFilename() in ESLint 10. The root cause is concentrated in a single utility file that calls the removed API whenever a rule needs to resolve the React version, meaning rules configured with version detection crash far more often than those without. A key diagnostic insight emerged: any failure that reproduces identically on both ESLint 9 and ESLint 10 points to a misconfigured test harness rather than a real compatibility issue. The episode highlights that a package's declared peer dependency range reflects when its author last verified compatibility, not whether the plugin actually works with a given version.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in