Skip to content

Catch and format SyntaxErrors as eslint violations#141

Merged
BPScott merged 2 commits intomasterfrom
report-syntax-errors
Dec 28, 2018
Merged

Catch and format SyntaxErrors as eslint violations#141
BPScott merged 2 commits intomasterfrom
report-syntax-errors

Conversation

@BPScott
Copy link
Copy Markdown
Member

@BPScott BPScott commented Dec 28, 2018

If Prettier can't format a file due to not being able to parse the given
content it throws a SyntaxError. If that happens then announce the
error as an ESLint rule violation instead of crashing.

The most plausible form of SyntaxErrors are when vue files contain invalid HTML such as no self-closing tags (e.g. <template><div></template> is invalid due to there being no </div>

Fixes #140.

Loading
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