Skip to content
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

Merged
merged 2 commits into from Jul 17, 2021

Conversation

@snitin315
Copy link
Contributor

@snitin315 snitin315 commented Jul 14, 2021

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 in consistent-return

What changes did you make? (Give an overview)

Just a small change from loc.start to loc

Is there anything you'd like reviewers to focus on?

No

@eslint-github-bot
Copy link

@eslint-github-bot eslint-github-bot bot commented Jul 14, 2021

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.

  • The length of the commit message must be less than or equal to 72

Read more about contributing to ESLint here

@snitin315 snitin315 force-pushed the update/consistent-report-loc branch from 9be2504 to 6e1e84f Jul 14, 2021
@snitin315 snitin315 changed the title Update: change reporting location for consistent-return rule (refs #12334) Update: add end location to report in consistent-return (refs #12334) Jul 14, 2021
Copy link
Member

@btmills btmills left a comment

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.

tests/lib/rules/consistent-return.js Outdated Show resolved Hide resolved
tests/lib/rules/consistent-return.js Outdated Show resolved Hide resolved
nzakas
nzakas approved these changes Jul 17, 2021
Copy link
Member

@nzakas nzakas left a comment

LGTM

@snitin315 snitin315 requested a review from btmills Jul 17, 2021
Copy link
Member

@btmills btmills left a comment

LGTM. Thanks @snitin315!

@btmills btmills merged commit a96b05f into master Jul 17, 2021
14 checks passed
@btmills btmills deleted the update/consistent-report-loc branch Jul 17, 2021
bmish added a commit to bmish/eslint that referenced this issue Jul 27, 2021
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants