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

Add loc back for typescript parser #9053

Merged
merged 1 commit into from Aug 25, 2020
Merged

Conversation

fisker
Copy link
Sponsor Member

@fisker fisker commented Aug 25, 2020

Jest inline snapshot rely on AST loc property, add it back to avoid breaking jest.

I also checked other parsers, we have loc in babel, because comments in babel don't have range info. flow parser seems don't have an option for it.

Context jestjs/jest#10444

/cc @SimenB @evilebottnawi @thorn0

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@SimenB
Copy link
Contributor

SimenB commented Aug 25, 2020

Can confirm this change fixes the reported regression 👍 (For both Jest 24 and Jest 26, fwiw)

@fisker fisker mentioned this pull request Aug 25, 2020
6 tasks
@fisker fisker merged commit 2a15e27 into prettier:master Aug 25, 2020
@fisker fisker deleted the typescript-loc branch August 25, 2020 15:05
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants