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
Update: add end location to report in consistent-return
(refs #12334)
#14798
Conversation
Hi @snitin315!, thanks for the Pull Request The first commit message 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.
Read more about contributing to ESLint here |
9be2504
to
6e1e84f
Compare
consistent-return
rule (refs #12334)consistent-return
(refs #12334)
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 taking on the rest of these end location reports! I see one test where the end location doesn't match my expectation. The start location matches what I'd expect, so this looks like the rule needs a new special case where it was previously able to use a fallback when it reported just start locations.
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
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 @snitin315!
* master: Chore: Adopt `eslint-plugin/require-meta-docs-url` rule internally (eslint#14823) Docs: New syntax issue template (eslint#14826) Chore: assertions on reporting loc in `unicode-bom` (refs eslint#12334) (eslint#14809) Docs: fix multiple broken links (eslint#14833) Chore: use `actions/setup-node@v2` (eslint#14816) Docs: Update README team and sponsors 7.31.0 Build: changelog update for 7.31.0 Upgrade: @eslint/eslintrc to v0.4.3 (eslint#14808) Update: add end location to report in `consistent-return` (refs eslint#12334) (eslint#14798) Docs: update BUG_REPORT template (eslint#14787) Docs: provide more context to no-eq-null (eslint#14801)
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[X] Other, please explain:
refs #12334
This PR adds
loc.end
to reports inconsistent-return
What changes did you make? (Give an overview)
Just a small change from
loc.start
toloc
Is there anything you'd like reviewers to focus on?
No