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
prettier@1.15.1 #9001
Merged
Merged
prettier@1.15.1 #9001
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
5 changes: 1 addition & 4 deletions
5
...babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_name/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
{ | ||
"sourceType": "module", | ||
"plugins": [ | ||
"jsx", | ||
"flow" | ||
], | ||
"plugins": ["jsx", "flow"], | ||
"throws": "Cannot overwrite reserved type _ (2:5)" | ||
} |
5 changes: 1 addition & 4 deletions
5
...parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_param_name/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
{ | ||
"sourceType": "module", | ||
"plugins": [ | ||
"jsx", | ||
"flow" | ||
], | ||
"plugins": ["jsx", "flow"], | ||
"throws": "Cannot overwrite reserved type _ (2:13)" | ||
} |
6 changes: 3 additions & 3 deletions
6
packages/babel-parser/test/fixtures/jsx/errors/html-comment/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"sourceType": "script", | ||
"plugins": ["jsx", "flow"] | ||
} | ||
"sourceType": "script", | ||
"plugins": ["jsx", "flow"] | ||
} |
5 changes: 1 addition & 4 deletions
5
...ages/babel-parser/test/fixtures/typescript/decorators/type-arguments-invalid/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
{ | ||
"plugins": [ | ||
"typescript", | ||
["decorators", { "decoratorsBeforeExport": true }] | ||
], | ||
"plugins": ["typescript", ["decorators", { "decoratorsBeforeExport": true }]], | ||
"throws": "Unexpected token, expected \"(\" (2:0)" | ||
} |
5 changes: 1 addition & 4 deletions
5
packages/babel-parser/test/fixtures/typescript/decorators/type-arguments/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
{ | ||
"plugins": [ | ||
"typescript", | ||
["decorators", { "decoratorsBeforeExport": true }] | ||
] | ||
"plugins": ["typescript", ["decorators", { "decoratorsBeforeExport": true }]] | ||
} |
6 changes: 2 additions & 4 deletions
6
packages/babel-parser/test/fixtures/typescript/types/tuple-optional-invalid/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
{ | ||
"sourceType": "module", | ||
"plugins": [ | ||
"typescript" | ||
], | ||
"plugins": ["typescript"], | ||
"throws": "A required element cannot follow an optional element. (1:17)" | ||
} | ||
} |
6 changes: 2 additions & 4 deletions
6
packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
{ | ||
"sourceType": "module", | ||
"plugins": [ | ||
"typescript" | ||
], | ||
"plugins": ["typescript"], | ||
"throws": "A rest element must be last in a tuple type. (1:8)" | ||
} | ||
} |
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
...test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-6/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"throws": "yield is not allowed in the parameters of an arrow function inside a generator (2:8)" | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...on/test/fixtures/es2017/async-functions/await-async-function-expression-name/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"throws": "invalid use of await inside of an async function (1:16)" | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...es2017/async-functions/await-function-declaration-name-inside-async-function/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"throws": "invalid use of await inside of an async function (2:11)" | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ait-inside-arguments-of-async-call-inside-parameters-of-async-arrow-function/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"throws": "await is not allowed in the parameters of an arrow function inside an async function (2:23)" | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...tures/es2017/async-functions/await-inside-parameters-of-async-arrow-function/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"throws": "Unexpected token, expected \",\" (1:17)" | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ures/es2017/async-functions/await-inside-parameters-of-nested-arrow-function/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"throws": "await is not allowed in the parameters of an arrow function inside an async function (2:7)" | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...s2017/async-functions/await-inside-parameters-of-nested-async-arrow-function/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"throws": "await is not allowed in the parameters of an arrow function inside an async function (2:13)" | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...t/fixtures/es2017/async-functions/await-inside-parameters-of-nested-function/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"throws": "Unexpected token, expected \",\" (2:25)" | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"throws": "await is not allowed in async function parameters (1:22)" | ||
} | ||
} |
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this seems to make some of these solidly unreadable. Can we see if this is expected, or a bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected: https://prettier.io/blog/2018/11/07/1.15.0.html#flatten-else-branch-for-nested-ternaries-5039-by-suchipi-5272-by-duailibe-5333-by-ikatyang
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, that's life with Prettier then :P I always thought the excessive nesting was a nice reminder that hey nested ternaries are usually a bad idea. Now they are easy to miss. Alas.