Skip to content

feat: support bulk suppressions#292

Open
viddo wants to merge 4 commits intowebpack:mainfrom
viddo:fix-not-fail-on-suppressions
Open

feat: support bulk suppressions#292
viddo wants to merge 4 commits intowebpack:mainfrom
viddo:fix-not-fail-on-suppressions

Conversation

@viddo
Copy link

@viddo viddo commented Dec 5, 2025

Summary

Fixes #291 by adding support for loading SuppressionsService from ESLint that is currently used from CLI.

What kind of change does this PR introduce?

feature/bugfix

Did you add tests for your changes?

Does this PR introduce a breaking change?

No, it only amends/fix the suppressions feature.

If relevant, what needs to be documented once your changes are merged or what have you already documented?

New option suppressionsLocation to indicate where the suppressions file is located (if not on default location).

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 5, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: ricardogobbosouza / name: Ricardo Gobbo de Souza (a6eeef1)

@viddo viddo changed the title feat: Fix errors despite bulk suppressions feat: support bulk suppressions Dec 5, 2025
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Can you accept CLA? Thank you

*/
function getSuppressionsService() {
// ESLint doesn't export SuppressionsService in package.json exports,
// so we need to resolve the path directly
Copy link
Member

Choose a reason for hiding this comment

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

We need to open an issue in eslint repo, ideally they should export or provide API for such things

Copy link
Author

Choose a reason for hiding this comment

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

There's already an open issue for programmatic usage, eslint/eslint#19603 and active RFC eslint/rfcs#142. From what I can tell, the RFC proposes adding applySuppressions as constructor option to the ESLint class which I believe would make this fn moot. But since it's still RFC may take a while longer before an implementation is available on stable version. I understand a workaround may not be desirable in the meantime.

How do you want to proceed? Should we close this PR, until it can be solved proper using official APIs?

Copy link
Member

@alexander-akait alexander-akait Feb 20, 2026

Choose a reason for hiding this comment

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

Let's add a TODO with links above and we can merge, when they resolved it we will migrate to the official API, sorry for delay

Copy link
Author

@viddo viddo Feb 20, 2026

Choose a reason for hiding this comment

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

Done, fde678f.

And no worries about delay! I've also been busy and disconnecting over holidays. No rush from my side about this. Have a great weekend!

Make comment into a TODO to explain and motivate fix for workaround in
the future.
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

/cc @ricardogobbosouza Can you look at this too, thanks

@ricardogobbosouza
Copy link
Collaborator

Eslint suppressions are only available on eslint >=9

Wait #295

@codecov
Copy link

codecov bot commented Feb 27, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@ricardogobbosouza
Copy link
Collaborator

@viddo could you please review testing and coverage?

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.

Errors despite bulk suppressions

3 participants