Conversation
|
|
src/applySuppressions.js
Outdated
| */ | ||
| function getSuppressionsService() { | ||
| // ESLint doesn't export SuppressionsService in package.json exports, | ||
| // so we need to resolve the path directly |
There was a problem hiding this comment.
We need to open an issue in eslint repo, ideally they should export or provide API for such things
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
alexander-akait
left a comment
There was a problem hiding this comment.
/cc @ricardogobbosouza Can you look at this too, thanks
|
Eslint suppressions are only available on eslint >=9 Wait #295 |
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 ☂️ |
|
@viddo could you please review testing and coverage? |
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
suppressionsLocationto indicate where the suppressions file is located (if not on default location).