-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Respecting prettiers default options (#549)
* having all options defined in our options object and making sure the defaults are being respected. See #375 * not using `byte` anymore * No testing when the js format on StandAlone * Update options.js Co-authored-by: Franco Victorio <[email protected]>
- Loading branch information
Showing
7 changed files
with
73 additions
and
5 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
coverage/**/*.js | ||
tests/format/**/*.sol | ||
tests/format/RespectDefaultOptions/respect-default-options.js | ||
tests/config/**/*.js | ||
src/prettier-comments/**/*.js |
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,4 @@ | ||
coverage/**/*.js | ||
tests/format/**/*.sol | ||
tests/format/RespectDefaultOptions/respect-default-options.js | ||
src/prettier-comments/**/*.js |
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
19 changes: 19 additions & 0 deletions
19
tests/format/RespectDefaultOptions/__snapshots__/jsfmt.spec.js.snap
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`respect-default-options.js format 1`] = ` | ||
====================================options===================================== | ||
parsers: ["babel"] | ||
printWidth: 80 | ||
| printWidth | ||
=====================================input====================================== | ||
function a() { | ||
return {key:value}; | ||
} | ||
=====================================output===================================== | ||
function a() { | ||
return { key: value }; | ||
} | ||
================================================================================ | ||
`; |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Standalone mode doesn't have default options. | ||
// This has been reported https://github.com/prettier/prettier/issues/11107 | ||
const { TEST_STANDALONE } = process.env; | ||
if (!TEST_STANDALONE) run_spec(__dirname, ['babel']); | ||
else test.todo.skip("Standalone mode doesn't have default options."); |
3 changes: 3 additions & 0 deletions
3
tests/format/RespectDefaultOptions/respect-default-options.js
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
function a() { | ||
return {key:value}; | ||
} |