vscode eslint配置和Prettier配置

{
//导入文件时是否携带文件的扩展名
    "path-autocomplete.extensionOnImport": true,
    //配置@的路径提示
    "path-autocomplete.pathMappings": {
 
        "@":"${folder}/src"
    },
    //EsLint配置
    "editor.codeActionsOnSave": {
        "source.fixAll": true,
    },
    "prettier.configPath": "C:\\Users\\F8609\\.prettierrc",
    "eslint.alwaysShowStatus ": true,
    "prettier.trailingComma": "none",
    "prettier.semi": false,
    //每行文字个数超出此限制将会被迫换行
    "prettier.printWidth": 300,
    //使用单引号替换双引号
    "prettier.singleQuote": true,
    "prettier.arrowParens": "avoid",
    //设置.vue文件中,HTML代码的格式化插件
    "vetur.format.defaultFormatter.html": "js-beautify-html",
    "vetur.ignoreProjectWarning": true,
    "vetur.format.defaultFormatterOptions": {
        "prettier": {
            "trailingComma": "none",
            "semi": false,
            "singleQuote": true,
            "arrowParens ": "avoid",
            "printWidth": 300
        },
        "js-beautify-html": {
            "wrap_attributes": false
        }
     },
}

.prettierrc文件

{
    "semi": false,
    "singleQuote": true,
    "bracketSpacing": true,
    "printWidth": 300,
    "trailingComma": "none"
}

你可能感兴趣的:(vscode)