VS Code配置

{
    "eslint.format.enable": true,
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },
    "[typescript]": {
        "editor.codeActionsOnSave": {
            "source.fixAll.eslint": true
        },
        // "editor.defaultFormatter": "dbaeumer.vscode-eslint",
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[vue]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode" // 使用 vetur 格式化规则
    },
    "vetur.format.defaultFormatterOptions": {
        "prettier": {
            "wrap_attributes": "force-aligned",
            "semi": false, //不加分号
            "trailingComma": "none", // 不加逗号
            "singleQuote": true, //用单引号
            "eslintIntegration": true //开启 eslint 支持
        },
        "js-beautify-html": {
            // 属性强制折行对齐
            "wrap_line_length": 280,
            "wrap_attributes": "auto",
            "end_with_newline": false
        }
    },
    "vetur.format.options.tabSize": 4,
    "vetur.format.defaultFormatter.js": "vscode-typescript",
    "vetur.format.defaultFormatter.html": "js-beautify-html",
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        "html",
        "vue",
        "typescript",
        "typescriptreact"
    ],
    "editor.formatOnSave": true,
    "editor.formatOnType": true,
    "editor.formatOnPaste": true,
    "auto-rename-tag.activationOnLanguage": [
        "*"
    ],
    "[javascript]": {
        "editor.defaultFormatter": "dbaeumer.vscode-eslint"
    },
    "security.workspace.trust.untrustedFiles": "open",
    "files.autoSave": "afterDelay",
    "eslint.alwaysShowStatus": true,
    "eslint.codeActionsOnSave.rules": null,
    "todo-tree.general.debug": true,
    "todo-tree.general.statusBar": "tags",
    "todo-tree.highlights.useColourScheme": true,
    "workbench.colorTheme": "Monokai",
    "todo-tree.highlights.customHighlight": {
        "BUG": {
            "icon": "bug"
        },
        "HACK": {
            "icon": "tools"
        },
        "FIXME": {
            "icon": "flame"
        },
        "XXX": {
            "icon": "$(close)"
        }
    },
    "todo-tree.tree.buttons.export": true,
    "todo-tree.tree.buttons.scanMode": true,
    "git.confirmSync": false,
    "explorer.confirmDragAndDrop": false,
    "git.enableSmartCommit": true,
    "editor.accessibilitySupport": "on",
    "workbench.startupEditor": "none",
    "[jsonc]": {
        "editor.defaultFormatter": "vscode.json-language-features"
    },
    "[json]": {
        "editor.defaultFormatter": "vscode.json-language-features"
    },
    "auto-close-tag.activationOnLanguage": [
    
        "xml",
        "php",
        "blade",
        "ejs",
        "jinja",
        "javascript",
        "javascriptreact",
        "typescript",
        "typescriptreact",
        "plaintext",
        "markdown",
        "vue",
        "liquid",
        "erb",
        "lang-cfml",
        "cfml",
        "HTML (EEx)",
        "HTML (Eex)",
        "plist"
    ],
    "typescript.updateImportsOnFileMove.enabled": "always",
    "explorer.confirmDelete": false,
    "[scss]": {
        "editor.defaultFormatter": "vscode.css-language-features"
    },
    "extensions.ignoreRecommendations": true,
    "workbench.editorAssociations": {
        "*.docx": "default"
    },
    "color-highlight.languages": [
        "*"
    ],
    "prettier.tabWidth": 4,
    "prettier.trailingComma": "none",
    "prettier.useEditorConfig": false,
    "prettier.semi": false,
    "prettier.singleQuote": true,
    "prettier.printWidth": 150
}

 

posted @ 2023-08-07 16:16  鸑鷟虽孤  阅读(21)  评论(0编辑  收藏  举报