首页 > 其他分享 >vscode配置setting.json

vscode配置setting.json

时间:2022-08-15 11:55:30浏览次数:62  
标签:false vscode eslint enabled json setting editor true prettier

配置setting.json

{
    "editor.largeFileOptimizations": false,
    "editor.fontSize": 15,
    "bracketPairColorizer.depreciation-notice": false,
    "files.autoSave": "onFocusChange",
    "workbench.preferredLightColorTheme": "Visual Studio Light",
    "liveServer.settings.donotShowInfoMsg": true,
    "liveServer.settings.CustomBrowser": "chrome",
    "security.workspace.trust.untrustedFiles": "open",
    "editor.tokenColorCustomizations": {
        "comments": "#3ee5eb"
    },
    "emmet.showSuggestionsAsSnippets": true,
    "kite.showWelcomeNotificationOnStartup": false,
    "editor.suggest.snippetsPreventQuickSuggestions": false,
    "javascript.referencesCodeLens.showOnAllFunctions": true,
    "javascript.referencesCodeLens.enabled": true,
    "typescript.inlayHints.functionLikeReturnTypes.enabled": true,
    "typescript.inlayHints.propertyDeclarationTypes.enabled": true,
    "typescript.inlayHints.parameterTypes.enabled": true,
    "typescript.inlayHints.variableTypes.enabled": true,
    "explorer.compactFolders": false,
    "workbench.editor.untitled.hint": "hidden",
    "editor.bracketPairColorization.enabled": true,
    "editor.guides.bracketPairs": "active",
    "emmet.triggerExpansionOnTab": true,
    "js/ts.implicitProjectConfig.strictFunctionTypes": false,
    "redhat.telemetry.enabled": true,
    // 換行
    "editor.wordWrap": "on",
    // 是否允许自定义的snippet片段提示
    "editor.snippetSuggestions": "top",
    // vscode默认启用了根据文件类型自动设置tabsize的选项 不檢查縮進,保存后統一按設置項來設置
    "editor.detectIndentation": false,
    // 重新设定tabsize 代码缩进修改成 4 个空格
    "editor.tabSize": 4,
    // #每次保存的时候自动格式化
    "editor.formatOnSave": true,
    // #每次保存的时候将代码按eslint格式进行修复 使用eslint 風格使用standard 進行代碼規則限制
    "editor.fontWeight": "200",
    "editor.formatOnType": true,
    "git.confirmSync": false,
    "team.showWelcomeMessage": false,
    "window.zoomLevel": 0,
    "editor.renderWhitespace": "boundary",
    "editor.cursorBlinking": "smooth",
    "editor.wordWrapColumn": 100,
    "editor.minimap.enabled": false,
    "window.title": "${dirty}${activeEditorMedium}${separator}${rootName}",
    "editor.codeLens": true,
    // eslint 代码自动检查相关配置
    "eslint.enable": true,
    "eslint.run": "onType",
    "eslint.options": {
        "plugins": ["html", "vue"],
        "extensions": [".js", ".vue"]
    },
    "eslint.codeAction.showDocumentation": {
        "enable": true
    },
 ​
    /* prettier格式化 */
 ​
    /* prettier格式化的配置 start */
    "prettier.printWidth": 800, // 超过最大值换行
    "prettier.tabWidth": 4, // 缩进字节数
    "prettier.useTabs": false, // 缩进不使用tab,使用空格
    "prettier.semi": true, // 句尾添加分号
    "prettier.singleQuote": true, // 使用单引号代替双引号
    "prettier.proseWrap": "preserve", // 默认值。因为使用了一些折行敏感型的渲染器(如GitHub comment)而按照markdown文本样式进行折行
    "prettier.arrowParens": "avoid", // (x) => {} 箭头函数参数只有一个时是否要有小括号。avoid:省略括号
    "prettier.bracketSpacing": true, // 在对象,数组括号与文字之间加空格 "{ foo: bar }"
    // "prettier.disableLanguages": ["vue"], // 不格式化vue文件,vue文件的格式化单独设置
    "prettier.endOfLine": "auto", // 结尾是 \n \r \n\r auto
    "prettier.eslintIntegration": false, //不让prettier使用eslint的代码格式进行校验
    "prettier.htmlWhitespaceSensitivity": "ignore",
    "prettier.ignorePath": ".prettierignore", // 不使用prettier格式化的文件填写在项目的.prettierignore文件中
    "prettier.jsxBracketSameLine": false, // 在jsx中把'>' 是否单独放一行
    "prettier.jsxSingleQuote": false, // 在jsx中使用单引号代替双引号
    "prettier.parser": "babylon", // 格式化的解析器,默认是babylon
    "prettier.requireConfig": false, // Require a 'prettierconfig' to format prettier
    "prettier.stylelintIntegration": false, //不让prettier使用stylelint的代码格式进行校验
    /* prettier格式化的配置 end */
    // #让函数(名)和后面的括号之间加个空格
    "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
 ​
    // 格式化stylus, 需安装Manta's Stylus Supremacy插件
    "stylusSupremacy.insertColons": false, // 是否插入冒号
    "stylusSupremacy.insertSemicolons": false, // 是否插入分号
    "stylusSupremacy.insertBraces": false, // 是否插入大括号
    "stylusSupremacy.insertNewLineAroundImports": false, // import之后是否换行
    "stylusSupremacy.insertNewLineAroundBlocks": false, // 两个选择器中是否换行
    "explorer.confirmDelete": false,
    "files.associations": {
        "*.cjson": "jsonc",
        "*.wxss": "css",
        "*.wxs": "javascript"
    },
    "emmet.includeLanguages": {
        "wxml": "html"
    },
    "minapp-vscode.disableAutoConfig": true,
    "window.menuBarVisibility": "visible",
    "git.enableSmartCommit": true,
    "git.autofetch": true,
    // 設置行高
    "editor.lineHeight": 20,
    "search.followSymlinks": false,
    "workbench.sideBar.location": "left",
    "vscode_custom_css.policy": true,
 ​
    "javascript.format.placeOpenBraceOnNewLineForControlBlocks": true,
    "editor.formatOnPaste": true,
    "vsicons.presets.hideFolders": true,
    "editor.cursorStyle": "line-thin",
    "editor.suggestSelection": "recentlyUsedByPrefix",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    // #每次保存的时候将代码按照 eslint 格式进行修复
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },
    "terminal.integrated.rendererType": "dom",
    "vscode_vibrancy.opacity": 1,
    "npm.fetchOnlinePackageInfo": false,
    "java.import.gradle.offline.enabled": true,
    "files.simpleDialog.enable": true,
    "calva.referencesCodeLens.enabled": true,
    "eslint.format.enable": true,
    "eslint.lintTask.enable": true,
    "java.signatureHelp.description.enabled": true,
    "java.signatureHelp.enabled": true,
    "vscodeReactRefactor.enableDebug": true,
    "vitest.enable": true,
    "vite.https": true,
    "javascript.inlayHints.propertyDeclarationTypes.enabled": true,
    "tslint.jsEnable": true,
    "npm.enableRunFromFolder": true,
    "reactSnippets.settings.prettierEnabled": true,
    "todo-tree.general.enableFileWatcher": true,
    "todo-tree.tree.buttons.groupBySubTag": true,
    "target": "es6",
    "vetur.format.options.tabSize": 4,
    "vetur.format.scriptInitialIndent": true, // js部分是否有初始缩进
    "vetur.format.styleInitialIndent": true, // style部分是否有初始缩进
    "vetur.completion.scaffoldSnippetSources": {},
    "vetur.format.defaultFormatter.html": "js-beautify-html", // js 不换行
    "vetur.format.defaultFormatterOptions": {
        "js-beautify-html": {
            "wrap_attributes": "auto", // html 标签属性 换行设置[auto|force|force-aligned|force-expand-multiline] ["auto"]
            "end_with_newline": false, // 在文件结尾添加新行
            "wrap_line_length": 120,
            "semi": false // 是否在每行末尾添加分号
        },
        "prettyhtml": {
            "singleQuote": false,
            "wrapAttributes": false,
            "sortAttributes": false
        },
        "prettier": {
            // 不加分号
            "semi": false,
            // 用单引号
            "singleQuote": true,
            // 禁止随时添加逗号
            "trailingComma": "none"
        }
    },
 ​
    // 显示 markdown 中英文切换时产生的特殊字符
    "editor.renderControlCharacters": true,
    // 新开窗口
    "workbench.startupEditor": "newUntitledFile",
    // 默认 lf 结尾
    "files.eol": "\n",
    // vscode update tips
    "update.mode": "none",
    // Internal terminal
    "code-runner.runInTerminal": true,
    "code-runner.fileDirectoryAsCwd": true,
    // vscode Suggested expansion
    "extensions.ignoreRecommendations": false,
    "editor.defaultFormatter": "octref.vetur",
 ​
    "vue-helper.indent-size": 4,
    "vue3snippets.useTabs": true,
    "vue3snippets.tabWidth": 4,
    "vue3snippets.jsxBracketSameLine": true,
    "vue3snippets.jsxSingleQuote": true,
    "vue3snippets.insertPragma": true,
    "vue3snippets.requirePragma": true,
    "vue3snippets.vueIndentScriptAndStyle": true,
 ​
    "easysass.compileAfterSave": true,
    "easysass.formats": [
        {
            "format": "nested",
            "extension": ".css"
        },
        {
            "format": "nested",
            "extension": ".css"
        }
    ],
    "easysass.targetDir": "css/",
 ​
    "editor.parameterHints": true,
    "editor.quickSuggestions": {
        "other": true,
        "comments": true,
        "strings": true
    },
    "workbench.editor.enablePreview": false,
    "[vue]": {
        "editor.defaultFormatter": "octref.vetur"
    },
    "editor.minimap.renderCharacters": false,
    "javascript.validate.enable": false,
    "editor.inlayHints.enabled": "off",
    "javascript.inlayHints.enumMemberValues.enabled": true,
    "javascript.inlayHints.functionLikeReturnTypes.enabled": true,
    "editor.tabCompletion": "onlySnippets",
    "vetur.format.options.useTabs": true,
    "[html]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    },
 ​
    "[sass]": {
        "editor.defaultFormatter": "syler.sass-indented"
    },
 ​
    //-------- Code Spell Checker Configuration --------
    // The Language locale to use when spell checking. "en", "en-US" and "en-GB" are currently supported by default.
    "cSpell.language": "en",
 ​
    // Controls the maximum number of spelling errors per document.
    "cSpell.maxNumberOfProblems": 100,
 ​
    // Controls the number of suggestions shown.
    "cSpell.numSuggestions": 8,
 ​
    // The minimum length of a word before checking it against a dictionary.
    "cSpell.minWordLength": 4,
 ​
    // Specify file types to spell check.
    "cSpell.enabledLanguageIds": ["csharp", "go", "javascript", "javascriptreact", "markdown", "php", "plaintext", "typescript", "typescriptreact", "yml"],
 ​
    // Enable / Disable the spell checker.
    "cSpell.enabled": true,
 ​
    // Display the spell checker status on the status bar.
    "cSpell.showStatus": true,
 ​
    // Words to add to dictionary for a workspace.
    "cSpell.words": [],
 ​
    // Enable / Disable compound words like 'errormessage'
    "cSpell.allowCompoundWords": false,
 ​
    // Words to be ignored and not suggested.
    "cSpell.ignoreWords": ["behaviour"],
 ​
    // User words to add to dictionary. Should only be in the user settings.
    "cSpell.userWords": [],
 ​
    // Specify paths/files to ignore.
    "cSpell.ignorePaths": [
        "node_modules", // this will ignore anything the node_modules directory
        "**/node_modules", // the same for this one
        "**/node_modules/**", // the same for this one
        "node_modules/**", // Doesn't currently work due to how the current working directory is determined.
        "vscode-extension", //
        ".git", // Ignore the .git directory
        "*.dll", // Ignore all .dll files.
        "**/*.dll" // Ignore all .dll files
    ]
 ​
 }
 ​

 

标签:false,vscode,eslint,enabled,json,setting,editor,true,prettier
From: https://www.cnblogs.com/zhaostudy/p/16587780.html

相关文章

  • 技术分享 | 接口自动化测试之JSON Schema模式该如何使用?
    原文链接JSONSchema模式是一个词汇表,可用于注释和验证JSON文档。在实际工作中,对接口返回值进行断言校验,除了常用字段的断言检测以外,还要对其他字段的类型进行检测。对......
  • JsonConfig配置Clob
    1.情景展示  项目使用的是Oracle数据库,并且表中的某些字段类型设置成了clob类型;  当我们从数据库读取数据的时候,需要单独对clob字段进行处理,否则返回的是内存地址......
  • Etherscan本地多文件开源(VScode)
    项目创建创建文件夹 mkdirDuckereum ​ cdDuckereum 添加nodejs配置 npminit-y 安装依赖添加 npminstall-Dhardhat npminstall--saveethers npm......
  • 解决vscode下载慢的问题
    在官网找到需要下载的软件版本:https://code.visualstudio.com/点击下载,大概率会出现如下情况:下载慢无法下载鼠标右键,复制下载地址将下载地址的......
  • 元素JS增删改查类名,报错TypeError: Cannot set properties of null (setting 'classNa
    在写原生js吸顶效果的时候,使用search.className="ceiling",添加类名,报以下错误。但效果可以正常执行    查阅文档,发现是可以存在空格就执行了这句代码search.c......
  • vscode c语言配置
    目录vscode插件字体大小编译配置设置coderunner设置如何运行/停止?vscode插件chineseC/C++coderunner字体大小右下角齿轮->设置->搜索字体->Editor:FontSizer......
  • vscode 尝试在目标目录创造文件时发生错误
    vscodeunins000.exe报错,尝试在目标目录创造文件时发生错误解决办法1.1确认路径右键点击vscode属性2.1进入目录然后点击到这个Code.exe的上一级目录3.1修改权限......
  • 2022.8.17 vscode与nodejs
    大前端01、概述和前端工具vscode安装1.1、下载安装VScode下载地址:https://code.visualstudio.com/   1:双击打开vscode安装包2:指定安装目录     ......
  • 用vscode学习使用markdown
    学习java的第一天学习使用vscode来写博客(markdown)字体加粗:hello斜体:hello加粗和斜体:hello引用学习java,走向人生巅峰分割线图片山河或者复制之后用alt+ctr......
  • json
    json也称为javascriptobjectnotation格式如下所示:>>>my_json={'name':'Python','address':{'porvince':'吉林','city':['长春','吉林']}}>>>my_json{'name':'Py......