Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consistently quote Sass modules strings
Fixes #11053.
- Loading branch information
Showing
5 changed files
with
81 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!-- | ||
1. Choose a folder based on which language your PR is for. | ||
- For JavaScript, choose `javascript/` etc. | ||
- For TypeScript specific syntax, choose `typescript/`. | ||
- If your PR applies to multiple languages, such as TypeScript/Flow, choose one folder and mention which languages it applies to. | ||
2. In your chosen folder, create a file with your PR number: `XXXX.md`. For example: `typescript/6728.md`. | ||
3. Copy the content below and paste it in your new file. | ||
4. Fill in a title, the PR number and your user name. | ||
5. Optionally write a description. Many times it’s enough with just sample code. | ||
6. Change ```jsx to your language. For example, ```yaml. | ||
7. Change the `// Input` and `// Prettier` comments to the comment syntax of your language. For example, `# Input`. | ||
8. Choose some nice input example code. Paste it along with the output before and after your PR. | ||
--> | ||
|
||
#### Consistently quote Sass modules strings (#11461 by @niksy) | ||
|
||
<!-- Optional description if it makes sense. --> | ||
|
||
<!-- prettier-ignore --> | ||
```scss | ||
// Input | ||
@use "sass:math"; | ||
@forward "list"; | ||
|
||
// Prettier stable | ||
@use "sass:math"; | ||
@forward "list"; | ||
|
||
// Prettier main | ||
@use 'sass:math'; | ||
@forward 'list'; | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`quotes.scss - {"singleQuote":true} format 1`] = ` | ||
====================================options===================================== | ||
parsers: ["scss"] | ||
printWidth: 80 | ||
singleQuote: true | ||
| printWidth | ||
=====================================input====================================== | ||
@use "module"; | ||
@forward "module"; | ||
=====================================output===================================== | ||
@use 'module'; | ||
@forward 'module'; | ||
================================================================================ | ||
`; | ||
|
||
exports[`quotes.scss format 1`] = ` | ||
====================================options===================================== | ||
parsers: ["scss"] | ||
printWidth: 80 | ||
| printWidth | ||
=====================================input====================================== | ||
@use "module"; | ||
@forward "module"; | ||
=====================================output===================================== | ||
@use "module"; | ||
@forward "module"; | ||
================================================================================ | ||
`; |
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,2 @@ | ||
run_spec(__dirname, ["scss"]); | ||
run_spec(__dirname, ["scss"], { singleQuote: true }); |
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,2 @@ | ||
@use "module"; | ||
@forward "module"; |