{
// vscode settings.json
"editor.quickSuggestions": {
"strings": true
},
"editor.fontSize": 16,
"editor.tabSize": 4,
"editor.detectIndentation": false,
"editor.minimap.maxColumn": 20,
"editor.minimap.enabled": false, //关闭右侧导航条视图
"editor.formatOnSave": true, // #每次保存的时候自动格式化
//#每次保存的时候将代码按eslint格式进行修复 # "eslint.autoFixOnSave": true,
"beautify.config": "",
"beautify.language": {
"html": ["htm", "html", "vue"],
"js": {
"type": ["javascript", "json"],
"filename": [".jshintrc", ".jsbeautify"]
},
"css": ["css", "scss", "less"]
},
"[javascript]": {
"editor.defaultFormatter": "HookyQR.beautify"
},
"[html]": {
"editor.defaultFormatter": "HookyQR.beautify"
},
"emmet.includeLanguages": {
"wxml": "html"
},
"javascript.updateImportsOnFileMove.enabled": "always",
"files.associations": {
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript"
},
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/**": true,
"**/env/**": true,
"**/venv/**": true,
"env-*": true
},
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/.vscode": true,
"**/__pycache__": true,
"**/.pytest_cache": true,
"**/node_modules": true,
"node_modules": true,
"venv": true,
"*.sublime-*": true,
"env*": true
},
"git.enabled": false,
"git.autorefresh": false,
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"vetur.format.options.tabSize": 2,
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"end_with_newline": true,
"wrap_attributes": "auto",
"wrap_line_length": "200",
"printWidth": 800,
"singleQuote": true,
"semi": true,
"tabWidth": 2,
"allowTrailingCommas": "",
"trailingComma": "all"
},
"prettier": {
/* prettier的配置 */
"printWidth": 800, // 超过最大值换行
"tabWidth": 2, // 缩进字节数
"arrowParens": "avoid", // 禁止随时添加逗号,这个很重要。找了好久allow paren-less arrow functions 箭头函数的参数使用圆括号
"useTabs": false, // 缩进不使用tab,使用空格
"singleQuote": true, // 使用单引号代替双引号
"proseWrap": "never", // 默认值。因为使用了一些折行敏感型的渲染器(如GitHub comment)而按照markdown文本样式进行折行
"bracketSpacing": true, // 在对象,数组括号与文字之间加空格 "{ foo: bar }"
"endOfLine": "auto", // 结尾是 \n \r \n\r auto
"eslintIntegration": false, //不让prettier使用eslint的代码格式进行校验
"htmlWhitespaceSensitivity": "ignore",
"ignorePath": ".prettierignore", // 不使用prettier格式化的文件填写在项目的.prettierignore文件中
"jsxBracketSameLine": false, // 在jsx中把'>' 是否单独放一行
"jsxSingleQuote": false, // 在jsx中使用单引号代替双引号
"parser": "babylon", // 格式化的解析器,默认是babylon
"requireConfig": false, // Require a 'prettierconfig' to format prettier
"stylelintIntegration": false, //不让prettier使用stylelint的代码格式进行校验
"trailingComma": "all", // 在对象或数组最后一个元素后面是否加逗号(在ES5中加尾逗号)
"tslintIntegration": false, // 不让prettier使用tslint的代码格式进行校验
"bracketSameLine": true, // 将>多行 HTML(HTML、JSX、Vue、Angular)元素的 放在最后一行的末尾,而不是单独放在下一行
"embeddedLanguageFormatting": "off", //如果 Prettier 可以自动识别嵌入代码,请对其进行格式化。
"semi": true // prettier 分号
}
},
"search.followSymlinks": false,
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/env": true,
"**/venv": true
},
"minapp-vscode.disableAutoConfig": true,
"update.mode": "none",
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
prettier格式化 ,好使但不习惯
最新推荐文章于 2024-08-21 11:39:00 发布