-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
fix: fix crash when message.fix
is nullish
#19168
Conversation
✅ Deploy Preview for docs-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thanks for the PR. It's not clear from the changes or from you repo how to reproduce this error. Can you please provide some reproduction steps? |
message.fix
is nilmessage.fix
is nullish
@ntnyq friendly ping. Can you answer my questions above? Thanks. |
Sorry for reply late. I created a new repo with fewer code https://github.com/ntnyq-dev/repro-eslint-fix. And added the repro steps in README. |
As I tested. When call
It cause the crash. |
Thanks, I can reproduce the crash. For the record, here's what I see in the console:
In the future, please be sure to open an issue first when reporting a bug so you can provide all of the info we need. |
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.
Just want to clean up the test names a bit, but otherwise looks good.
Got it and Resolved. Thanks for your advice. |
Don't know why Browser Test failed in CI. I tried run it in local and it went well. |
Don't worry about the browser test. It's pretty flaky lately. |
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. Would like another review before merging.
I think this is rather a bug in the processor. It gets a lint message without
but returns message with
Lint messages normally don't have the |
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!
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[x] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
No need for providing the template. So I skipped it.
What changes did you make? (Give an overview)
This PR adds a simple check in
linter.source-code-fixer
incasingmessage.fix
equals tonull
orundefined
which might cause the linter throw.Is there anything you'd like reviewers to focus on?
There is a reproduction repo https://github.com/pany-ang/issue-eslint-config.
Or you can just remove the check, run the tests added.