// TypeScript
// Enable/disable automatic closing of JSX tags. Requires using TypeScript 3.0 or newer in the workspace.
//启用/禁用JSX标签的自动关闭。需要在工作区中使用TypeScript 3.0或更高版本。
"javascript.autoClosingTags": true,
// Enable/disable default JavaScript formatter.
//启用/禁用默认的JavaScript格式化程序。
"javascript.format.enable": true,
// Defines space handling after a comma delimiter.
//在逗号定界符后定义空间处理。
"javascript.format.insertSpaceAfterCommaDelimiter": true,
// Defines space handling after the constructor keyword. Requires using TypeScript 2.3.0 or newer in the workspace.
//在构造函数关键字之后定义空间处理。需要在工作区中使用TypeScript 2.3.0或更高版本。
"javascript.format.insertSpaceAfterConstructor": false,
// Defines space handling after function keyword for anonymous functions.
//在匿名关键字的function关键字之后定义空间处理。
"javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true,
// Defines space handling after keywords in a control flow statement.
//在控制流语句中的关键字之后定义空间处理。
"javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": true,
// Defines space handling after opening and before closing JSX expression braces.
//定义在打开和关闭JSX表达式括号之后的空间处理。
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
// Defines space handling after opening and before closing non-empty braces. Requires using TypeScript 2.3.0 or newer in the workspace.
//定义在打开非空括号之后和关闭非空括号之前的空间处理。需要在工作区中使用TypeScript 2.3.0或更高版本。
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
// Defines space handling after opening and before closing non-empty brackets.
//定义在打开非空括号之后和关闭非空括号之前的空间处理。
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
// Defines space handling after opening and before closing non-empty parenthesis.
//定义在打开非空括号之后和关闭非空括号之前的空间处理。
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
// Defines space handling after opening and before closing template string braces.
//定义打开和关闭模板字符串大括号之前的空间处理。
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
// Defines space handling after a semicolon in a for statement.
//在for语句中的分号后定义空间处理。
"javascript.format.insertSpaceAfterSemicolonInForStatements": true,
// Defines space handling after a binary operator.
// 在二进制运算符之后定义空间处理。
"javascript.format.insertSpaceBeforeAndAfterBinaryOperators": true,
// Defines space handling before function argument parentheses.
//在函数参数括号前定义空间处理
"javascript.format.insertSpaceBeforeFunctionParenthesis": false,
// Defines whether an open brace is put onto a new line for control blocks or not.
//定义是否在控制块的新行上放置一个开括号。
"javascript.format.placeOpenBraceOnNewLineForControlBlocks": false,
// Defines whether an open brace is put onto a new line for functions or not.
//定义是否在函数的新行上放置一个大括号。
"javascript.format.placeOpenBraceOnNewLineForFunctions": false,
// Defines handling of optional semicolons. Requires using TypeScript 3.7 or newer in the workspace.
// - ignore: Don't insert or remove any semicolons.
// - insert: Insert semicolons at statement ends.
// - remove: Remove unnecessary semicolons.
//定义对可选分号的处理。需要在工作区中使用TypeScript 3.7或更高版本。
//-忽略:请勿插入或删除任何分号。
//-insert:在语句末尾插入分号。
//-删除:删除不必要的分号。
"javascript.format.semicolons": "ignore",
// Enable/disable semantic checking of JavaScript files. Existing jsconfig.json or tsconfig.json files override this setting. Requires using TypeScript 2.3.1 or newer in the workspace.
//启用/禁用JavaScript文件的语义检查。现有的jsconfig.json或tsconfig.json文件会覆盖此设置。需要在工作区中使用TypeScript 2.3.1或更高版本。
"javascript.implicitProjectConfig.checkJs": false,
// Preferred path style for auto imports.
// - auto: Automatically select import path style. Prefers using a relative import if `baseUrl` is configured and the relative path has fewer segments than the non-relative import.
// - relative: Relative to the file location.
// - non-relative: Based on the `baseUrl` configured in your `jsconfig.json` / `tsconfig.json`.
//自动导入的首选路径样式。
//-自动:自动选择导入路径样式。如果配置了“ baseUrl”并且相对路径的段数少于非相对导入的段,则首选使用相对导入。
//-相对:相对于文件位置。
//-非相对:基于在jsconfig.json /tsconfig.json中配置的baseUrl。
"javascript.preferences.importModuleSpecifier": "auto",
// Preferred path ending for auto imports.
// - auto: Use project settings to select a default.
// - minimal: Shorten `./component/index.js` to `./component`.
// - index: Shorten `./component/index.js` to `./component/index`.
// - js: Do not shorten path endings; include the `.js` extension.
//自动导入的首选路径结尾。
//-自动:使用项目设置选择默认值。
//-最少:将`。/ component / index.js`缩短为`。/ component`。
//-index:将`。/ component / index.js`缩短为`。/ component / index`。
//-js:请勿缩短路径结尾;包括`.js`扩展名。
"javascript.preferences.importModuleSpecifierEnding": "auto",
// Preferred quote style to use for quick fixes: `single` quotes, `double` quotes, or `auto` infer quote type from existing imports. Requires using TypeScript 2.9 or newer in the workspace.
//用于快速修复的首选引号样式:“单引号”,“双引号”或“自动”从现有导入中推断出引号类型。需要在工作区中使用TypeScript 2.9或更高版本。
"javascript.preferences.quoteStyle": "auto",
// Enable/disable introducing aliases for object shorthand properties during renames. Requires using TypeScript 3.4 or newer in the workspace.
//启用/禁用重命名期间为对象速记属性引入别名。需要在工作区中使用TypeScript 3.4或更高版本。
"javascript.preferences.useAliasesForRenames": true,
// Enable/disable references CodeLens in JavaScript files.
//启用/禁用JavaScript文件中的引用CodeLens
"javascript.referencesCodeLens.enabled": false,
// Enable/disable references CodeLens on all functions in JavaScript files.
//在JavaScript文件中的所有函数上启用/禁用对CodeLens的引用。
"javascript.referencesCodeLens.showOnAllFunctions": false,
// Enable/disable auto import suggestions. Requires using TypeScript 2.6.1 or newer in the workspace.
//启用/禁用自动导入建议。需要在工作区中使用TypeScript 2.6.1或更高版本。
"javascript.suggest.autoImports": true,
// Complete functions with their parameter signature.
//使用参数签名完成功能。
"javascript.suggest.completeFunctionCalls": false,
// Enable/disable suggestion to complete JSDoc comments.
//启用/禁用建议以完成JSDoc注释
"javascript.suggest.completeJSDocs": true,
// Enabled/disable autocomplete suggestions.
// 启用/禁用自动填充建议。
"javascript.suggest.enabled": true,
// Enable/disable showing completions on potentially undefined values that insert an optional chain call. Requires TS 3.7+ and strict null checks to be enabled.
//启用/禁用对插入可选链调用的潜在未定义值的显示完成。要求TS 3.7+和严格的空检查被启用
"javascript.suggest.includeAutomaticOptionalChainCompletions": true,
// Enable/disable including unique names from the file in JavaScript suggestions. Note that name suggestions are always disabled in JavaScript code that is semantically checked using `@ts-check` or `checkJs`.
//启用/禁用在JavaScript建议中包含文件的唯一名称。注意,在使用“@ts-check”或“checkJs”进行语义检查的JavaScript代码中,名称建议总是被禁用的。
"javascript.suggest.names": true,
// Enable/disable suggestions for paths in import statements and require calls.
//启用/禁用import语句中的路径建议,并要求调用
"javascript.suggest.paths": true,
// Enable/disable suggestion diagnostics for JavaScript files in the editor. Requires using TypeScript 2.8 or newer in the workspace.
//在编辑器中启用/禁用JavaScript文件的建议诊断。需要在工作空间中使用TypeScript 2.8或更新版本
"javascript.suggestionActions.enabled": true,
// Enable/disable automatic updating of import paths when you rename or move a file in VS Code. Requires using TypeScript 2.9 or newer in the workspace.
// - prompt: Prompt on each rename.
// - always: Always update paths automatically.
// - never: Never rename paths and don't prompt.
//在VS代码中重命名或移动文件时启用/禁用导入路径的自动更新。需要在工作空间中使用TypeScript 2.9或更新版本。
// -提示符:对每个提示符进行重命名。
// -总是:总是自动更新路径。
// - never:决不重命名路径和不提示。
"javascript.updateImportsOnFileMove.enabled": "prompt",
// Enable/disable JavaScript validation.
//启用/禁用JavaScript验证
"javascript.validate.enable": true,
/* prettier的配置 */
"prettier.printWidth": 120, // 超过最大值换行
"prettier.tabWidth": 4, // 缩进字节数
"prettier.useTabs": false, // 缩进不使用tab,使用空格
"prettier.semi": false, // 句尾添加分号
"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", // 结尾是
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.trailingComma": "es5", // 在对象或数组最后一个元素后面是否加逗号(在ES5中加尾逗号)
"prettier.tslintIntegration": false, // 不让prettier使用tslint的代码格式进行校验