Visual Studio Code Formatting fail on save

前端 未结 11 1369
悲哀的现实
悲哀的现实 2021-01-08 00:21

I\'ve started learning React Native.

I\'m using Visual Studio Code as my editor.

I\'ve set up the boiler plate and started the app. But whenever I change a .

相关标签:
11条回答
  • 2021-01-08 01:03

    I found out what this was by looking though the extensions. Thanks to @wgj for the hint.

    Turns out it was the JS-CSS-HTML formatter. I looked through the instructions and have removed the auto save for now. I'll have to work out the specific settings for this.

    It uses js-beautify so if anyone knows the settings I should be looking at would be much appreciated.

    0 讨论(0)
  • 2021-01-08 01:04

    I had a similar problem and it turned out my ultimate culprit was...

    So I simply disabled it for the workspace.

    0 讨论(0)
  • 2021-01-08 01:04

    Same here, all my HTML format messed up after saving, I disable "JS-CSS-HTML Formatter" and problem solved

    0 讨论(0)
  • 2021-01-08 01:04

    I have tried all methods but the problem is solved completely by this: -> Open setting.json -> "files.associations": { "*.js": "javascriptreact" } ->Add above lines and press save the problem will solve

    0 讨论(0)
  • 2021-01-08 01:09

    I found my solution to this problem by converting my components file extension from js to jsx. No more issues and everything is working fine.

    0 讨论(0)
提交回复
热议问题