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

Throw svelte errors in format prettier expects #40

Merged
merged 1 commit into from
May 26, 2019

Conversation

RedHatter
Copy link

In order to show a code frame prettier expects error objects to have loc.start and loc.end fields. Svelte emits errors with start and end fields. A quick modification to the error object and re-throwing and prettier can print code frames from svelte errors.

@jamesbirtles
Copy link
Contributor

Cool, thanks!

@jamesbirtles jamesbirtles merged commit 204d416 into sveltejs:master May 26, 2019
@RedHatter RedHatter deleted the print-errors branch May 26, 2019 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants