The installation docs make the following suggestion for creating an empty prettier config file:
echo {}> .prettierrc.json
This is a useful suggestion in most cases, but breaks for people using Windows and PowerShell, which "uses the Unicode UTF-16LE encoding by default".
I gave students a lab this week, and asked them to set up prettier. A number of them struggled with errors that they couldn't make sense of--all of them were encoding related, and all of the people affected were on Windows and PowerShell.
It looks like this has been discussed in the past, but the suggestions then seem to be "convert the file to UTF8."
I wonder if it would be better to suggest another method for doing this (there's nothing sacred about using the echo style above) and/or add a note about PowerShell and the need for UTF8 in JSON.
The installation docs make the following suggestion for creating an empty prettier config file:
This is a useful suggestion in most cases, but breaks for people using Windows and PowerShell, which "uses the Unicode UTF-16LE encoding by default".
I gave students a lab this week, and asked them to set up prettier. A number of them struggled with errors that they couldn't make sense of--all of them were encoding related, and all of the people affected were on Windows and PowerShell.
It looks like this has been discussed in the past, but the suggestions then seem to be "convert the file to UTF8."
I wonder if it would be better to suggest another method for doing this (there's nothing sacred about using the
echostyle above) and/or add a note about PowerShell and the need for UTF8 in JSON.