fix: format JSX Fragment correctly, consider Fragment as block#6398
Merged
thorn0 merged 1 commit intoprettier:masterfrom Nov 18, 2019
JounQin:feat/mdx_fragment
Merged
fix: format JSX Fragment correctly, consider Fragment as block#6398thorn0 merged 1 commit intoprettier:masterfrom JounQin:feat/mdx_fragment
thorn0 merged 1 commit intoprettier:masterfrom
JounQin:feat/mdx_fragment
Conversation
Member
Author
|
@evilebottnawi @ikatyang I have no idea why babel parser throws, and Besides, the error come from |
Member
|
You could try changing that section to this: if (error.loc) {
throw createError(
// babel error prints (l:c) with cols that are zero indexed
// so we need our custom error
error.message.replace(/ \(.*\)/, ""),
{
start: {
line: error.loc.line,
column: error.loc.column + 1
}
}
);
} else {
throw error;
}That should show you the real error that’s causing the crash. |
Member
Author
|
It seems |
Member
Author
|
@j-f1 The tests have been fixed, would you like to review again? |
4 tasks
Member
Author
|
@evilebottnawi @ikatyang Please help to review. |
ikatyang
reviewed
Aug 19, 2019
This was referenced Nov 13, 2019
Member
|
Sorry, i am not familiar with mdx, i can't review |
Member
|
I'm not really familiar with MDX too albeit I learnt a lot about it today. =) |
Member
Author
|
@evilebottnawi @ikatyang @thorn0 This PR becomes much cleaner and easier for reviewing after #6949 been merged, thanks for @thorn0's great work. Please help to review it. |
thorn0
reviewed
Nov 16, 2019
thorn0
reviewed
Nov 16, 2019
thorn0
reviewed
Nov 18, 2019
thorn0
approved these changes
Nov 18, 2019
alexander-akait
approved these changes
Nov 18, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs/directory)CHANGELOG.unreleased.mdfile following the template.✨Try the playground for this PR✨