visual Studio Code 编辑器 格式化文本(ESLint) 配置

**

安装 Visual Studio Code ESLint 插件

**
打开 Visual Studio Code ,首先使用快捷键 Ctrl + Shift + P 调出VsCode的控制台,然后输入下面的命令安装ESLint插件:

ext install ESLint

使用 NPM 安装 ESLint

为了方便我们通过ESLint命令行工具来帮助我们生成ESLint相关的配置,我们需要进行全局安装:

npm install eslint -g

配置 visual Studio Code 找到settings

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

找到settings.json 放入一下代码

{ // 
    "vetur.validation.template": false,
    "editor.fontSize": 16,//Fira Code
    "editor.fontFamily": "Consolas, 'Courier New', monospace", 
    "editor.fontLigatures": true,
    "editor.tabSize": 2,
    "editor.formatOnType": true,
    "editor.renderWhitespace": "all",
    "editor.wordSeparators": "`~!@#$%^&*()=+[{]}\|;:'\",.<>",
    "extensions.autoUpdate": true,
    "emmet.syntaxProfiles": {
        "vue-html": "html",
        "vue": "html",
        // "javascript": "jsx",
        "javascript": "html"
    },
    "emmet.includeLanguages": {
        "vue-html": "html",
        "vue": "html",
        "javascript": "javascriptreact",
        "wxml": "html"
    },
    "emmet.triggerExpansionOnTab": true,
    "terminal.external.windowsExec": "C:\#Alan\Software\cmder\Cmder.exe",
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        "vue-html",
        {
            "language": "vue",
            "autoFix": true
        },
        "html",
        "vue"
    ],
    // 需要 npm install -g eslint-plugin-vue
    "eslint.options": {
        "extensions": [
            ".js",
            ".vue"
        ]
    },
    "files.associations": {
        "*.vue": "vue",
        "*.js": "javascript",
        "*.cjson": "jsonc",
        "*.wxss": "css",
        "*.wxs": "javascript",
        // "*.wpy": "vue"
    },
    "editor.cursorBlinking": "smooth",
    "sync.gist": "fdb18e3ec92c75bb841502887ff811ad",
    "sync.autoDownload": false,
    "sync.autoUpload": false,
    "sync.forceDownload": false,
    "sync.quietSync": false,
    "editor.renderIndentGuides": false,
    "search.exclude": {
        "**de_modules": true,
        "**/bower_components": true,
        "**/dist": true
    },
    "vetur.format.styleInitialIndent": true,
    "vetur.format.scriptInitialIndent": true,
    "eslint.autoFixOnSave": true,
    "window.zoomLevel": 0,
    "sync.askGistName": false,
    "fileheader.Author": "Alan-Yih",
    "workbench.startupEditor": "newUntitledFile",
    "liveServer.settings.donotShowInfoMsg": true,
    "git.confirmSync": false,
    "explorer.confirmDragAndDrop": false,
    "explorer.confirmDelete": false,
    "workbench.colorCustomizations": {},
    // "materialTheme.cache.workbench.settings": {
    // "accentPrevious": "Purple",
    // "themeColours": "Default"
    // },
    "python.disablePromptForFeatures": [
        "pylint"
    ],
    "python.linting.flake8Enabled": true
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值