Add support for Prettier JS formater

Hi, support for Prettier would be great in my opinion.

Thanks for this great service.

Cheers

You can configure that in project settings see the second part of Keybinding a terminal command?

Just for people who come after me.

I added

prettier --write "$file"

Under Preferences -> Project -> JavaScript Support -> Custom Code Formatter

Activated “Format Code on Save”

Disabled “Use Build-in JSBeautify as Code Formatter”

And got the error that prettier can’t be found.

I had to restart my Cloud9 EC2 instance after the change, then it worked.

I sometime use
https://jsonformatter.org/jsbeautifier

1 Like