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

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 eslint-github-bot bot added the triage An ESLint team member will look at this issue soon label Jul 14, 2021
@eslint-github-bot
Copy link

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 Compare July 14, 2021 01:17
@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

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.

tests/lib/rules/consistent-return.js Outdated Show resolved Hide resolved
tests/lib/rules/consistent-return.js Outdated Show resolved Hide resolved
@btmills btmills added accepted There is consensus among the team that this change meets the criteria for inclusion enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules and removed triage An ESLint team member will look at this issue soon labels Jul 14, 2021
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@snitin315 snitin315 requested a review from btmills July 17, 2021 01:42
Copy link
Member

@btmills btmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @snitin315!

@btmills btmills merged commit a96b05f into master Jul 17, 2021
@btmills btmills deleted the update/consistent-report-loc branch July 17, 2021 21:34
bmish added a commit to bmish/eslint that referenced this pull request 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)
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Jan 14, 2022
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jan 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants