prettier / prettier-emacs

Minor mode to format JS code on file save
http://jlongster.com/A-Prettier-Formatter
372 stars 53 forks source link

fix #77: prettier-js cleanse the code #78

Open t1anchen opened 1 month ago

t1anchen commented 1 month ago

Problem

See the issue #77

Brief Analysis

After debugging the procedure, it is found that the call-process calls prettier with arguments with outputting to temporary files before doing patching. Original implementation is to input code content to prettier via standard input, however somehow it does not work under win11/powershell. When putting the code file as argument, the reformat is working (e.g. prettier xxx.js).

Test Coverage

Only tested on Win11. Environment can be found in issue #77 as well.