mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-10-28 08:26:01 +08:00
72 lines
2.7 KiB
JSON
72 lines
2.7 KiB
JSON
{
|
|
// If updating this, also update the config in dtsBundler.mjs.
|
|
"indentWidth": 4,
|
|
"lineWidth": 1000,
|
|
"newLineKind": "auto",
|
|
"useTabs": false,
|
|
"typescript": {
|
|
"newLineKind": "crlf",
|
|
"semiColons": "always",
|
|
"quoteStyle": "preferDouble",
|
|
"quoteProps": "consistent",
|
|
"useBraces": "whenNotSingleLine",
|
|
"bracePosition": "sameLineUnlessHanging",
|
|
"singleBodyPosition": "sameLine",
|
|
"nextControlFlowPosition": "nextLine", // Stroustrup style braces.
|
|
"trailingCommas": "onlyMultiLine",
|
|
"preferHanging": false,
|
|
"operatorPosition": "maintain",
|
|
|
|
"arrowFunction.useParentheses": "preferNone",
|
|
"conditionalExpression.linePerExpression": false, // Keep our "match/case"-ish conditionals.
|
|
"functionExpression.spaceAfterFunctionKeyword": true,
|
|
"importDeclaration.forceMultiLine": "whenMultiple",
|
|
"constructorType.spaceAfterNewKeyword": true,
|
|
"constructSignature.spaceAfterNewKeyword": true,
|
|
|
|
"module.sortImportDeclarations": "caseInsensitive",
|
|
"module.sortExportDeclarations": "caseInsensitive",
|
|
"exportDeclaration.sortNamedExports": "caseInsensitive",
|
|
"importDeclaration.sortNamedImports": "caseInsensitive"
|
|
},
|
|
"yaml": {
|
|
"indentWidth": 2,
|
|
"quotes": "preferSingle"
|
|
},
|
|
"json": {
|
|
// This would be good to do in known-JSONC files, but VS Code warns on trailing commas.
|
|
"trailingCommas": "never"
|
|
},
|
|
"gofumpt": {
|
|
"langVersion": "go1.26",
|
|
"modulePath": "github.com/microsoft/TypeScript/tsc"
|
|
},
|
|
"excludes": [
|
|
"**/.git",
|
|
"**/node_modules",
|
|
"**/*-lock.json",
|
|
"**/testdata",
|
|
"packages/vscode-typescript/l10n/**",
|
|
"tsc/internal/bundled/libs/**",
|
|
"tools/scripts/lsp/*.json",
|
|
"tools/scripts/lsp/metaModelSchema.mts",
|
|
// Needs to be LF to have a working shebang.
|
|
"packages/typescript/bin/tsc",
|
|
"tsc/internal/bundled/source/**",
|
|
"tsc/internal/diagnostics/diagnosticMessages.generated.json",
|
|
"tsc/internal/diagnostics/loc/*.generated.json",
|
|
"packages/typescript/dist/**",
|
|
"packages/typescript/tsconfig.tsbuildinfo",
|
|
"packages/vscode-typescript/dist/**",
|
|
"packages/vscode-typescript-nightly/dist/**",
|
|
"packages/typescript/vendor/**"
|
|
],
|
|
// Note: if adding new languages, make sure settings.template.json is updated too.
|
|
"plugins": [
|
|
"npm:@dprint/typescript",
|
|
"npm:@dprint/json",
|
|
"npm:dprint-plugin-yaml",
|
|
"npm:@jakebailey/dprint-plugin-gofumpt"
|
|
]
|
|
}
|