vscode常规eslint配置--备忘

{
    "workbench.iconTheme": "vscode-icons",
    "workbench.colorTheme": "One Dark Pro",
    "launch": {
        "configurations": [],
        "compounds": []
        },
        //配置eslint
        "eslint.validate": [
        "javascript",
        "javascriptreact",
        "vue"
        ],
        "files.autoSave": "onFocusChange",
        "vsicons.dontShowNewVersionMessage": true,
        "editor.fontLigatures": null,
        // "remote.SSH.showLoginTerminal": true,
        // "remote.SSH.remotePlatform": {
        // "9.135.163.249": "linux"
        // },
        "git.ignoreLegacyWarning": true,
        "security.workspace.trust.untrustedFiles": "open",
        "typescript.tsdk": "",
        "editor.formatOnPaste": true,
        "editor.formatOnType": true,
        "editor.formatOnSave": true,
        "editor.tabSize": 2,
        // "eslint.autoFixOnSave": true, // 每次保存的时候将代码按eslint格式进行修复
        "prettier.eslintIntegration": true, //让prettier使用eslint的代码格式进行校验
        "javascript.format.insertSpaceBeforeFunctionParenthesis": true, //让函数(名)和后面的括号之间加个空格
        "vetur.format.defaultFormatter.html": "js-beautify-html", //格式化.vue中html
        "vetur.format.defaultFormatter.js": "vscode-typescript", //让vue中的js按编辑器自带的ts格式进行格式化
        "vetur.format.defaultFormatterOptions": {
        // "js-beautify-html": {
        // "wrap_attributes": "force-aligned" //属性强制折行对齐
        // }
        },
        "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
        },
        "[javascript]": {
            // "editor.defaultFormatter": "esbenp.prettier-vscode"
        },
            // 头部注释
            "fileheader.customMade": {
                "autoAdd": false, //关闭自动生成头部注释
            },
            // "fileheader.configObj": {
            //     "autoAdd": false, // 关闭
            // },
}
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容