Skip to content

Commit a9dac55

Browse files
authored
Merge branch 'main' into singleLineDeindent
2 parents 10fe082 + 0319eed commit a9dac55

File tree

1,582 files changed

+38962
-25514
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,582 files changed

+38962
-25514
lines changed

.devcontainer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ If you already have VS Code and Docker installed, you can click the badge above
1818
1919
3. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the [Dev Containers](https://aka.ms/vscode-remote/download/containers) extension.
2020

21-
![Image of Dev Containers extension](https://microsoft.github.io/vscode-remote-release/images/remote-containers-extn.png)
21+
![Image of Dev Containers extension](https://microsoft.github.io/vscode-remote-release/images/dev-containers-extn.png)
2222

2323
> **Note:** The Dev Containers extension requires the Visual Studio Code distribution of Code - OSS. See the [FAQ](https://aka.ms/vscode-remote/faq/license) for details.
2424

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
**/extensions/notebook-renderers/renderer-out/index.js
1414
**/extensions/simple-browser/media/index.js
1515
**/extensions/typescript-language-features/test-workspace/**
16+
**/extensions/typescript-language-features/extension.webpack.config.js
17+
**/extensions/typescript-language-features/extension-browser.webpack.config.js
18+
**/extensions/typescript-language-features/web/**
1619
**/extensions/vscode-api-tests/testWorkspace/**
1720
**/extensions/vscode-api-tests/testWorkspace2/**
1821
**/fixtures/**
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
import * as eslint from 'eslint';
7+
8+
export = new class DeclareServiceBrand implements eslint.Rule.RuleModule {
9+
10+
readonly meta: eslint.Rule.RuleMetaData = {
11+
fixable: 'code'
12+
};
13+
14+
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
15+
return {
16+
['PropertyDefinition[key.name="_serviceBrand"][value]']: (node: any) => {
17+
return context.report({
18+
node,
19+
message: `The '_serviceBrand'-property should not have a value`,
20+
fix: (fixer) => {
21+
return fixer.replaceText(node, 'declare _serviceBrand: undefined;')
22+
}
23+
});
24+
}
25+
};
26+
}
27+
};

.eslintplugin/code-no-unexternalized-strings.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,27 @@ export = new class NoUnexternalizedStrings implements eslint.Rule.RuleModule {
8585
}
8686
}
8787

88+
function visitL10NCall(node: TSESTree.CallExpression) {
89+
90+
// localize(key, message)
91+
const [messageNode] = (<TSESTree.CallExpression>node).arguments;
92+
93+
// remove message-argument from doubleQuoted list and make
94+
// sure it is a string-literal
95+
if (isStringLiteral(messageNode)) {
96+
doubleQuotedStringLiterals.delete(messageNode);
97+
} else if (messageNode.type === AST_NODE_TYPES.ObjectExpression) {
98+
for (const prop of messageNode.properties) {
99+
if (prop.type === AST_NODE_TYPES.Property) {
100+
if (prop.key.type === AST_NODE_TYPES.Identifier && prop.key.name === 'message') {
101+
doubleQuotedStringLiterals.delete(prop.value);
102+
break;
103+
}
104+
}
105+
}
106+
}
107+
}
108+
88109
function reportBadStringsAndBadKeys() {
89110
// (1)
90111
// report all strings that are in double quotes
@@ -117,7 +138,16 @@ export = new class NoUnexternalizedStrings implements eslint.Rule.RuleModule {
117138
return {
118139
['Literal']: (node: any) => collectDoubleQuotedStrings(node),
119140
['ExpressionStatement[directive] Literal:exit']: (node: any) => doubleQuotedStringLiterals.delete(node),
141+
142+
// localize(...)
120143
['CallExpression[callee.type="MemberExpression"][callee.object.name="nls"][callee.property.name="localize"]:exit']: (node: any) => visitLocalizeCall(node),
144+
145+
// vscode.l10n.t(...)
146+
['CallExpression[callee.type="MemberExpression"][callee.object.property.name="l10n"][callee.property.name="t"]:exit']: (node: any) => visitL10NCall(node),
147+
148+
// l10n.t(...)
149+
['CallExpression[callee.object.name="l10n"][callee.property.name="t"]:exit']: (node: any) => visitL10NCall(node),
150+
121151
['CallExpression[callee.name="localize"][arguments.length>=2]:exit']: (node: any) => visitLocalizeCall(node),
122152
['Program:exit']: reportBadStringsAndBadKeys,
123153
};

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"local/code-no-nls-in-standalone-editor": "warn",
7373
"local/code-no-standalone-editor": "warn",
7474
"local/code-no-unexternalized-strings": "warn",
75+
"local/code-declare-service-brand": "warn",
7576
"local/code-layering": [
7677
"warn",
7778
{
@@ -331,7 +332,7 @@
331332
"vs/base/parts/*/~",
332333
"vs/platform/*/~",
333334
"tas-client-umd", // node module allowed even in /common/
334-
"@microsoft/1ds-core-js",// node module allowed even in /common/
335+
"@microsoft/1ds-core-js", // node module allowed even in /common/
335336
"@microsoft/1ds-post-js" // node module allowed even in /common/
336337
]
337338
},

.github/classifier.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"labels": {
88
"L10N": {"assign": ["TylerLeonhardt", "csigs"]},
99
"VIM": {"assign": []},
10-
"accessibility": { "assign": ["isidorn"]},
10+
"accessibility": { "assign": ["meganrogge"]},
1111
"api": {"assign": ["jrieken"]},
1212
"api-finalization": {"assign": []},
1313
"api-proposal": {"assign": ["jrieken"]},
@@ -78,13 +78,13 @@
7878
"file-watcher": {"assign": ["bpasero"]},
7979
"font-rendering": {"assign": []},
8080
"formatting": {"assign": []},
81+
"getting-started": {"assign": ["bhavyaus"]},
8182
"ghost-text": {"assign": ["hediet"]},
8283
"git": {"assign": ["lszomoru"]},
8384
"gpu": {"assign": ["deepak1556"]},
8485
"grammar": {"assign": ["mjbvz"]},
8586
"grid-view": {"assign": ["joaomoreno"]},
8687
"html": {"assign": ["aeschli"]},
87-
"i18n": {"assign": []},
8888
"icon-brand": {"assign": []},
8989
"icons-product": {"assign": ["daviddossett"]},
9090
"inlay-hints": {"assign": ["jrieken", "hediet"]},
@@ -133,7 +133,7 @@
133133
"rename": {"assign": ["jrieken"]},
134134
"scm": {"assign": ["lszomoru"]},
135135
"screencast-mode": {"assign": ["lszomoru"]},
136-
"search": {"assign": ["roblourens", "andreamah"]},
136+
"search": {"assign": ["andreamah"]},
137137
"search-editor": {"assign": ["roblourens"]},
138138
"search-replace": {"assign": ["sandy081"]},
139139
"semantic-tokens": {"assign": ["alexdima", "aeschli"]},

.github/commands.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@
451451
],
452452
"action": "comment",
453453
"addLabel": "info-needed",
454-
"comment": "Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, `.gif` files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.\n\nIf the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (`Developer: Toggle Screencast Mode` in the command palette).\n\nHappy coding!"
454+
"comment": "Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, `.gif` files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.\n\nIf the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (`Developer: Toggle Screencast Mode` in the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue.\n\nHappy coding!"
455455
},
456456
{
457457
"__comment__": "Allows folks on the team to label issues by commenting: `\\label My-Label` ",

.github/workflows/codeql.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/pr-chat.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.vscode/notebooks/api.github-issues

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{
88
"kind": 2,
99
"language": "github-issues",
10-
"value": "$repo=repo:microsoft/vscode\n$milestone=milestone:\"October 2022\""
10+
"value": "$repo=repo:microsoft/vscode\n$milestone=milestone:\"November 2022\""
1111
},
1212
{
1313
"kind": 1,

0 commit comments

Comments
 (0)