Skip to content

Commit e3c4990

Browse files
author
Liangcheng Juves
committed
Merge branch 'microsoft:main' into main
2 parents 0d4fcfc + a12af58 commit e3c4990

File tree

236 files changed

+4994
-4072
lines changed

Some content is hidden

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

236 files changed

+4994
-4072
lines changed

.eslintrc.json

+14
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
"restrictions": [
105105
"assert",
106106
"sinon",
107+
"sinon-test",
107108
"vs/nls",
108109
"**/vs/base/common/**",
109110
"**/vs/base/test/common/**"
@@ -139,6 +140,7 @@
139140
"restrictions": [
140141
"assert",
141142
"sinon",
143+
"sinon-test",
142144
"vs/nls",
143145
"**/vs/base/{common,browser}/**",
144146
"**/vs/base/test/{common,browser}/**"
@@ -212,6 +214,7 @@
212214
"restrictions": [
213215
"assert",
214216
"sinon",
217+
"sinon-test",
215218
"vs/nls",
216219
"**/vs/base/common/**",
217220
"**/vs/base/parts/*/common/**",
@@ -225,6 +228,7 @@
225228
"restrictions": [
226229
"assert",
227230
"sinon",
231+
"sinon-test",
228232
"vs/nls",
229233
"**/vs/base/{common,browser}/**",
230234
"**/vs/base/parts/*/{common,browser}/**",
@@ -289,6 +293,7 @@
289293
"restrictions": [
290294
"assert",
291295
"sinon",
296+
"sinon-test",
292297
"vs/nls",
293298
"**/vs/base/{common,browser}/**",
294299
"**/vs/base/parts/*/{common,browser}/**",
@@ -311,6 +316,7 @@
311316
"restrictions": [
312317
"assert",
313318
"sinon",
319+
"sinon-test",
314320
"vs/nls",
315321
"**/vs/base/common/**",
316322
"**/vs/platform/*/common/**",
@@ -334,6 +340,7 @@
334340
"restrictions": [
335341
"assert",
336342
"sinon",
343+
"sinon-test",
337344
"vs/nls",
338345
"**/vs/base/{common,browser}/**",
339346
"**/vs/platform/*/{common,browser}/**",
@@ -357,6 +364,7 @@
357364
"restrictions": [
358365
"assert",
359366
"sinon",
367+
"sinon-test",
360368
"vs/nls",
361369
"**/vs/base/common/**",
362370
"**/vs/platform/*/common/**",
@@ -383,6 +391,7 @@
383391
"restrictions": [
384392
"assert",
385393
"sinon",
394+
"sinon-test",
386395
"vs/nls",
387396
"**/vs/base/{common,browser}/**",
388397
"**/vs/platform/*/{common,browser}/**",
@@ -397,6 +406,7 @@
397406
"restrictions": [
398407
"assert",
399408
"sinon",
409+
"sinon-test",
400410
"vs/nls",
401411
"**/vs/base/{common,browser}/**",
402412
"**/vs/base/test/{common,browser}/**",
@@ -921,6 +931,7 @@
921931
"**/vs/**",
922932
"assert",
923933
"sinon",
934+
"sinon-test",
924935
"crypto",
925936
"vscode"
926937
]
@@ -952,6 +963,7 @@
952963
"**/vs/**",
953964
"assert",
954965
"sinon",
966+
"sinon-test",
955967
"crypto",
956968
"xterm*"
957969
]
@@ -962,6 +974,7 @@
962974
"**/vs/**",
963975
"assert",
964976
"sinon",
977+
"sinon-test",
965978
"crypto",
966979
"xterm*"
967980
]
@@ -989,6 +1002,7 @@
9891002
"vscode-dts-cancellation": "warn",
9901003
"vscode-dts-use-thenable": "warn",
9911004
"vscode-dts-region-comments": "warn",
1005+
"vscode-dts-vscode-in-comments": "warn",
9921006
"vscode-dts-provider-naming": [
9931007
"warn",
9941008
{

.github/workflows/english-please.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,17 @@ on:
77
jobs:
88
main:
99
runs-on: ubuntu-latest
10+
if: contains(github.event.issue.labels.*.name, '*english-please')
1011
steps:
1112
- name: Checkout Actions
12-
if: contains(github.event.issue.labels.*.name, '*english-please')
1313
uses: actions/checkout@v2
1414
with:
1515
repository: "microsoft/vscode-github-triage-actions"
1616
ref: stable
1717
path: ./actions
1818
- name: Install Actions
19-
if: contains(github.event.issue.labels.*.name, '*english-please')
2019
run: npm install --production --prefix ./actions
2120
- name: Run English Please
22-
if: contains(github.event.issue.labels.*.name, '*english-please')
2321
uses: ./actions/english-please
2422
with:
2523
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}

.github/workflows/rich-navigation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ jobs:
3333
with:
3434
languages: typescript
3535
repo-token: ${{ secrets.GITHUB_TOKEN }}
36-
typescriptVersion: 0.6.0-next.8
36+
typescriptVersion: 0.6.0-dev.1
3737
continue-on-error: true

.vscode/notebooks/api.github-issues

+1-1
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:\"May 2021\""
10+
"value": "$repo=repo:microsoft/vscode\n$milestone=milestone:\"June 2021\""
1111
},
1212
{
1313
"kind": 1,

build/filters.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ module.exports.indentationFilter = [
5151
'!test/monaco/out/**',
5252
'!test/smoke/out/**',
5353
'!extensions/typescript-language-features/test-workspace/**',
54-
'!extensions/notebook-markdown-extensions/notebook-out/**',
54+
'!extensions/markdown-math/notebook-out/**',
5555
'!extensions/vscode-api-tests/testWorkspace/**',
5656
'!extensions/vscode-api-tests/testWorkspace2/**',
5757
'!extensions/vscode-custom-editor-tests/test-workspace/**',
@@ -89,7 +89,7 @@ module.exports.indentationFilter = [
8989
'!**/*.dockerfile',
9090
'!extensions/markdown-language-features/media/*.js',
9191
'!extensions/markdown-language-features/notebook-out/*.js',
92-
'!extensions/notebook-markdown-extensions/notebook-out/*.js',
92+
'!extensions/markdown-math/notebook-out/*.js',
9393
'!extensions/simple-browser/media/*.js',
9494
];
9595

@@ -119,7 +119,7 @@ module.exports.copyrightFilter = [
119119
'!resources/completions/**',
120120
'!extensions/configuration-editing/build/inline-allOf.ts',
121121
'!extensions/markdown-language-features/media/highlight.css',
122-
'!extensions/notebook-markdown-extensions/notebook-out/**',
122+
'!extensions/markdown-math/notebook-out/**',
123123
'!extensions/html-language-features/server/src/modes/typescript/*',
124124
'!extensions/*/server/bin/*',
125125
'!src/vs/editor/test/node/classification/typescript-test.ts',

build/gulpfile.extensions.js

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const compilations = [
5050
'json-language-features/server/tsconfig.json',
5151
'markdown-language-features/preview-src/tsconfig.json',
5252
'markdown-language-features/tsconfig.json',
53+
'markdown-math/tsconfig.json',
5354
'merge-conflict/tsconfig.json',
5455
'microsoft-authentication/tsconfig.json',
5556
'npm/tsconfig.json',
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
"use strict";
2+
/*---------------------------------------------------------------------------------------------
3+
* Copyright (c) Microsoft Corporation. All rights reserved.
4+
* Licensed under the MIT License. See License.txt in the project root for license information.
5+
*--------------------------------------------------------------------------------------------*/
6+
module.exports = new class ApiVsCodeInComments {
7+
constructor() {
8+
this.meta = {
9+
messages: {
10+
comment: `Don't use the term 'vs code' in comments`
11+
}
12+
};
13+
}
14+
create(context) {
15+
const sourceCode = context.getSourceCode();
16+
return {
17+
['Program']: (_node) => {
18+
for (const comment of sourceCode.getAllComments()) {
19+
if (comment.type !== 'Block') {
20+
continue;
21+
}
22+
if (!comment.range) {
23+
continue;
24+
}
25+
const startIndex = comment.range[0] + '/*'.length;
26+
const re = /vs code/ig;
27+
let match;
28+
while ((match = re.exec(comment.value))) {
29+
// Allow using 'VS Code' in quotes
30+
if (comment.value[match.index - 1] === `'` && comment.value[match.index + match[0].length] === `'`) {
31+
continue;
32+
}
33+
// Types for eslint seem incorrect
34+
const start = sourceCode.getLocFromIndex(startIndex + match.index);
35+
const end = sourceCode.getLocFromIndex(startIndex + match.index + match[0].length);
36+
context.report({
37+
messageId: 'comment',
38+
loc: { start, end }
39+
});
40+
}
41+
}
42+
}
43+
};
44+
}
45+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
import type * as estree from 'estree';
8+
9+
export = new class ApiVsCodeInComments implements eslint.Rule.RuleModule {
10+
11+
readonly meta: eslint.Rule.RuleMetaData = {
12+
messages: {
13+
comment: `Don't use the term 'vs code' in comments`
14+
}
15+
};
16+
17+
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
18+
19+
const sourceCode = context.getSourceCode();
20+
21+
return {
22+
['Program']: (_node: any) => {
23+
24+
for (const comment of sourceCode.getAllComments()) {
25+
if (comment.type !== 'Block') {
26+
continue;
27+
}
28+
if (!comment.range) {
29+
continue;
30+
}
31+
32+
const startIndex = comment.range[0] + '/*'.length;
33+
const re = /vs code/ig;
34+
let match: RegExpExecArray | null;
35+
while ((match = re.exec(comment.value))) {
36+
// Allow using 'VS Code' in quotes
37+
if (comment.value[match.index - 1] === `'` && comment.value[match.index + match[0].length] === `'`) {
38+
continue;
39+
}
40+
41+
// Types for eslint seem incorrect
42+
const start = sourceCode.getLocFromIndex(startIndex + match.index) as any as estree.Position;
43+
const end = sourceCode.getLocFromIndex(startIndex + match.index + match[0].length) as any as estree.Position;
44+
context.report({
45+
messageId: 'comment',
46+
loc: { start, end }
47+
});
48+
}
49+
}
50+
}
51+
};
52+
}
53+
};

build/lib/extensions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ const webpackMediaConfigFiles = [
338338
// Additional projects to run esbuild on. These typically build code for webviews
339339
const esbuildMediaScripts = [
340340
'markdown-language-features/esbuild.js',
341-
'notebook-markdown-extensions/esbuild.js',
341+
'markdown-math/esbuild.js',
342342
];
343343
async function webpackExtensions(taskName, isWatch, webpackConfigLocations) {
344344
const webpack = require('webpack');

build/lib/extensions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ const webpackMediaConfigFiles = [
417417
// Additional projects to run esbuild on. These typically build code for webviews
418418
const esbuildMediaScripts = [
419419
'markdown-language-features/esbuild.js',
420-
'notebook-markdown-extensions/esbuild.js',
420+
'markdown-math/esbuild.js',
421421
];
422422

423423
export async function webpackExtensions(taskName: string, isWatch: boolean, webpackConfigLocations: { configPath: string, outputRoot?: string }[]) {

0 commit comments

Comments
 (0)