jsdevkr / gitCodeShare.com

Contributhon 2018 - gitCodeShare.com (a.k.a gitShare)
https://gitcodeshare.com
MIT License
76 stars 21 forks source link

[Solved] prettier conflicts with beautify #79

Closed currybob closed 6 years ago

currybob commented 6 years ago

I was using beautify before using prettier and it seemed to work well for a while. However, immediately after that, I realized that storing jsx in js would always cause breaking. I did not find a cause for it, but it turned out to be conflict between prettier and beautify.

Expected

2018-09-07 2 01 41

Actual

2018-09-07 2 03 03

The best way is to remove the beautify of duplicate personality. But if you want to use it at the same time in other code like html, css, else, add one to your user settings.

"beautify.ignore": [
    "**/*.js",
    "**/*.jsx",
    "**/*.ts",
    "**/*.tsx"
 ]
gimdongwoo commented 6 years ago

If you use the VSCode and the Prettier, and you use .js to React. This setting helps you.

"files.associations": {
        "*.js": "javascriptreact"
    },