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

test(ast-spec): snapshot codeframe of error #6555

Merged
merged 1 commit into from Mar 2, 2023

Conversation

fisker
Copy link
Contributor

@fisker fisker commented Mar 2, 2023

PR Checklist

Overview

During upgrade parser to v6 in Prettier, I found some error location should be improved, but before that, let's make the error visible?

@nx-cloud
Copy link

nx-cloud bot commented Mar 2, 2023

☁️ Nx Cloud Report

We didn't find any information for the current pull request with the commit 33a4fec.
You might need to set the 'NX_BRANCH' environment variable in your CI pipeline.

Check the Nx Cloud Github Integration documentation for more information.


Sent with 💌 from NxCloud.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @fisker!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

@netlify
Copy link

netlify bot commented Mar 2, 2023

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 33a4fec
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/64001902a7308b000802f101
😎 Deploy Preview https://deploy-preview-6555--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

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

this is a great idea!
I wonder if we should be capturing an end as well as part of the TSError?

That way we could throw errors on ranges instead of just on single characters.
Looks like code-frame also supports an end range, so we would even be able to snapshot it.

WDYT?

@bradzacher bradzacher added the tests anything to do with testing label Mar 2, 2023
@fisker
Copy link
Contributor Author

fisker commented Mar 2, 2023

I wonder if we should be capturing an end as well as part of the TSError?

Prettier throws errors include a start and an end, see this diff.
I hope to merge this one first, and change the errors to add more information later.

@fisker
Copy link
Contributor Author

fisker commented Mar 2, 2023

@bradzacher Don't know how to fix this, can you help?

@bradzacher bradzacher changed the title test: snapshot codeframe of error test(ast-spec): snapshot codeframe of error Mar 2, 2023
@bradzacher bradzacher merged commit ff680bb into typescript-eslint:v6 Mar 2, 2023
@bradzacher
Copy link
Member

oops - i didn't see the error before merging 🤦

@fisker fisker deleted the snapshot-error branch March 2, 2023 04:42
@bradzacher
Copy link
Member

Should be fixed by f98afd2

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tests anything to do with testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants