Visual studio code changes format (React-JSX)

后端 未结 12 1049
难免孤独
难免孤独 2020-12-12 13:45

I\'ve the following snippet in my index.js

class App extends Component {
    render() {
        return ( 
Welc
12条回答
  •  误落风尘
    2020-12-12 14:15

    I struggled with this but finally found a solution. This is my settings.json

    {
        "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
        "workbench.startupEditor": "welcomePage",
        "window.zoomLevel": 1,
        "emmet.includeLanguages": {
            "javascript": "javascriptreact",
            "vue-html": "html"
        },
        "editor.formatOnSave": true,
        "javascript.updateImportsOnFileMove.enabled": "always",
        "editor.wordWrap": "on",
        "editor.tabSize": 2,
        "editor.minimap.enabled": false,
        "workbench.iconTheme": "vscode-icons",
        "eslint.autoFixOnSave": true,
        "eslint.alwaysShowStatus": true,
        "beautify.ignore": [
            "**/*.js",
            "**/*.jsx"
        ],
        "prettier.jsxSingleQuote": true,
        "prettier.singleQuote": true
    }
    

    I added

    "beautify.ignore": ["**/*.js","**/*.jsx"]
    

提交回复
热议问题