Skip to content

fix(ci): Ignore type test failures for types present in ESLint 8 that we removed in ESLint 9.31.0 #460

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

Merged
merged 1 commit into from
Jul 25, 2025

Conversation

mureinik
Copy link

@mureinik mureinik commented Jul 25, 2025

[email protected] removed some of the RuleContext types (see eslint/eslint#19910), causing the test:types CI script to fail.

Since eslint-plugin-n still needs to support 8.x versions of eslint, the implementation that relies on RuleContexts can't be removed.

A simple solution to unblock the CI is to annotate the few places that rely on them with @ts-ignore.
When eslint 8.x support is dropped, these annotations should be removed. That, in turn, will expose the code that relies on eslint 8.x APIs, which should then also be removed.

As part of this PR, the eslint dependency was bumped to ^9.31.0.
This was done in order to prevent developers from developing locally with older 9.x versions of eslint and accidentally introducing new code that relies on these types without properly handling the type annotations and having it fail in the CI.

Fixes #459

[email protected] removed some of the RuleContext types (see
eslint/eslint#19910), causing the `test:types`
CI script to fail.

Since eslint-plugin-n still needs to support 8.x versions of eslint,
the implementation that relies on RuleContexts can't be removed.

A simple solution to unblock the CI is to annotate the few places that
rely on them with @ts-ignore.
When eslint 8.x support is dropped, these annotations should be removed.
That, in turn, will expose the code that relies on eslint 8.x APIs,
which should then also be removed.

As part of this PR, the eslint dependency was bumped to ^9.31.0.
This was done in order to prevent developers from developing locally
with older 9.x versions of eslint and accidentally introducing new code
that relies of these types with properly handling the type annotations
and having it fail in the CI.

Fixes eslint-community#459
@mureinik mureinik changed the title fix(ci) lock down [email protected] to fix test:types fix(ci): Ignore type test failures for types present in ESLint 8 that we removed in ESLint 9.31.0 Jul 25, 2025
Copy link

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@aladdin-add aladdin-add merged commit 76f8150 into eslint-community:master Jul 25, 2025
29 checks passed
@mureinik mureinik deleted the fix-type-lint branch July 25, 2025 22:14
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

Successfully merging this pull request may close these issues.

Bug: test:types broken with eslint>=9.31.0
2 participants