-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
feat: Add suppress ignored file warnings RFC #90
Conversation
Hi @domnantas!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
|
d07d120
to
ecb2643
Compare
ecb2643
to
16717da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for writing this up!
Hi @domnantas!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
Hi @domnantas!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
61e091c
to
f3422e8
Compare
f3422e8
to
4f9072d
Compare
4f9072d
to
0af9007
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together. It seems simple enough. Just left a few comments.
Thanks for the comments! I'm working on a PR to the https://github.com/eslint/eslint repo, because it's difficult to discuss the implementation details without having a clear picture of how this flag might work and relate to other pieces of the codebase |
A note for the team: if we move forward with this, it will be one more thing we will need to reconcile with FlatESLint going forward. I’m a little uneasy with continuing to add features into ESLint before FlatESLint is finished, so we may want to talk timelines here. |
0af9007
to
7401dff
Compare
I have created an example PR and updated the RFC accordingly. Making the default value of I'm not exactly sure what's the scope of FlatESLint and how it is related. As you can see in the PR, there are very little changes in terms of functionality and I'm willing to help with integration of this RFC with FlatESLint. If you do decide to put this RFC on hold for the time being, I respect that decision too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This update LGTM. Would like feedback from @mdjermanovic before moving to final commenting.
@@ -143,6 +222,8 @@ It was considered to output the warning to `stderr` instead, but that would caus | |||
|
|||
ESLint [collects suppressed warnings and errors](https://github.com/eslint/eslint/pull/15459). In case `--no-warning-on-ignored-files` or `warnIgnored: false` is used, should the warning be included in the suppressed messages array? | |||
|
|||
Should the `warnIgnored` option be available via `eslint.config.js` too? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My vote is no, let's keep it as a CLI only option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, this doesn't seem like an option that should be available in eslint config files.
I think we were in favor of consistency over maintaining backwards compatibility. When |
@mdjermanovic That was the initial idea, which I still agree with. Since releasing the breaking change is taking a really long time (1.5 years already), and people are continuously requesting this feature, I think it makes sense to release this feature as part of FlatESLint, just like @nzakas suggested. Minor downside - the flag will only be available if you're using FlatESLint. Consistency and backporting to non-FlatESLint can be addressed as a separate issue/RFC |
Since you both are in favor of this, that's what we should do. No need to continue discussion there. :)
I'm very sorry about that. We are incredibly shorthanded and considering breaking changes takes a lot of extra effort. We really appreciate you sticking with us! (I myself had an RFC go over two years, so I understand the struggle.)
That's fine. In the next major release FlatESLint will be the default. |
I think there's confusion about the timing. My understanding is that since the |
Yes, that's correct. Because Ideally we'd do a major release this summer as we wrap up all the flat config work. |
If the major release is planned for this summer, could the breaking change (consistent |
We plan to implement this change only for flat config. We can release this change in So basically this RFC should be reverted to the initial idea ( |
Ah, I think I now understand what you're suggesting. Since we can do breaking changes when targeting flat config, we can do the consistency fix for the |
@domnantas exactly! Once this update is made, I think we can formally approve this and move forward. We really appreciate your patience. |
Apologies for the inactivity. I am traveling with a sparse internet connection. I will be away until June. If anyone would like to take over updating the RFC before I return, feel free to do so. |
|
|
4314e53
to
e124a6e
Compare
@nzakas @mdjermanovic Updated the RFC. Non-flat ESLint should not be affected, while FlatESLint Had to force-push, because the first 2 commits were signed using my old email, which is no longer associated with my Github account, and that caused the CLA error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Moving to Final Commenting as this was the last update requested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final commenting period has been completed so this is approved! 🎉
Summary
When ignored files are explicitly linted, ESLint shows a warning. This causes problems when using tools which pass the file list to ESLint automatically together with
--max-warnings 0
option.Related Issues
Main issue:
eslint/eslint#15010
Related issues:
eslint/eslint#9977
eslint/eslint#12206
eslint/eslint#12249