Skip to content

Commit 4f91735

Browse files
committed
Merge branch 'main' into alexr00/particular-bug
2 parents 7eb1133 + c281f31 commit 4f91735

File tree

171 files changed

+13025
-2269
lines changed

Some content is hidden

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

171 files changed

+13025
-2269
lines changed

.eslintrc.base.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
"no-sequences": "error",
5656
"no-template-curly-in-string": "warn",
5757
"no-throw-literal": "error",
58-
"no-unmodified-loop-condition": "warn",
5958
"no-unneeded-ternary": "error",
6059
"no-use-before-define": "off",
6160
"no-useless-call": "error",

.eslintrc.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
'use strict';
7+
8+
const RULES_DIR = require('eslint-plugin-rulesdir');
9+
RULES_DIR.RULES_DIR = './build/eslint-rules';
10+
11+
module.exports = {
12+
extends: ['.eslintrc.base.json'],
13+
env: {
14+
browser: true,
15+
node: true
16+
},
17+
parserOptions: {
18+
project: 'tsconfig.eslint.json'
19+
},
20+
plugins: ['rulesdir'],
21+
overrides: [
22+
{
23+
files: ['webviews/**/*.ts', 'webviews/**/*.tsx'],
24+
rules: {
25+
'rulesdir/public-methods-well-defined-types': 'error'
26+
}
27+
},
28+
{
29+
files: ['**/*.ts', '**/*.tsx'],
30+
rules: {
31+
'rulesdir/no-any-except-union-method-signature': 'error'
32+
}
33+
}
34+
]
35+
};

.eslintrc.json

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

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ about: Create a report to help us improve
1111
- VSCode Version:
1212
- OS:
1313
- Repository Clone Configuration (single repository/fork of an upstream repository):
14-
- Github Product (Github.com/Github Enterprise version x.x.x):
14+
- GitHub Product (GitHub.com/GitHub Enterprise version x.x.x):
1515

1616
Steps to Reproduce:
1717

.github/copilot-instructions.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## General Guidelines
2+
- **Follow the existing code style**: Use single quotes, semicolons, and 2-space indentation. See `.eslintrc.base.json` for detailed linting rules.
3+
- **TypeScript**: Use modern TypeScript features. Prefer explicit types where clarity is needed, but do not over-annotate.
4+
- **React/JSX**: Webviews use React-style JSX with custom factories (`vscpp`, `vscppf`).
5+
- **Strictness**: Some strictness is disabled in `tsconfig.base.json` (e.g., `strictNullChecks: false`), but new code should avoid unsafe patterns.
6+
- **Testing**: Place tests under `src/test`. Do not include test code in production files.
7+
- **Localization**: Use `%key%` syntax for strings that require localization. See `package.nls.json`.
8+
9+
## Extension-Specific Practices
10+
- **VS Code API**: Use the official VS Code API for all extension points. Register commands, views, and menus via `package.json`.
11+
- **Configuration**: All user-facing settings must be declared in `package.json` under `contributes.configuration`.
12+
- **Activation Events**: Only add new activation events if absolutely necessary.
13+
- **Webviews**: Place webview code in the `webviews/` directory. Use the shared `common/` code where possible.
14+
- **Commands**: Register new commands in `package.json` and implement them in `src/commands.ts` or a relevant module.
15+
- **Logging**: Use the `Logger` utility for all logging purposes. Don't use console.log or similar methods directly.
16+
17+
## Pull Request Guidelines
18+
- Never touch the yarn.lock file.
19+
- Run `yarn run lint` and also `npm run hygiene` and fix any errors or warnings before submitting a PR.
20+
21+
---
22+
_Last updated: 2025-06-20_
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: "Copilot Setup Steps"
2+
3+
# Automatically run the setup steps when they are changed to allow for easy validation, and
4+
# allow manual testing through the repository's "Actions" tab
5+
on:
6+
workflow_dispatch:
7+
push:
8+
paths:
9+
- .github/workflows/copilot-setup-steps.yml
10+
pull_request:
11+
paths:
12+
- .github/workflows/copilot-setup-steps.yml
13+
14+
jobs:
15+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
16+
copilot-setup-steps:
17+
runs-on: ubuntu-latest
18+
19+
# Set the permissions to the lowest permissions possible needed for your steps.
20+
# Copilot will be given its own token for its operations.
21+
permissions:
22+
contents: read
23+
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
28+
- name: Set up Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: "20"
32+
cache: "yarn"
33+
34+
- name: Install dependencies
35+
run: yarn install --frozen-lockfile
36+
env:
37+
# Skip Playwright browser downloads to avoid installation failures
38+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
39+
40+
- name: Install Playwright browsers (if needed)
41+
run: |
42+
if [ -d "node_modules/playwright" ]; then
43+
echo "Installing Playwright browsers..."
44+
npx playwright install --with-deps
45+
else
46+
echo "Playwright not found, skipping browser installation"
47+
fi
48+
continue-on-error: true
49+
50+
- name: Update VS Code type definitions
51+
run: yarn update-dts
52+
53+
- name: Basic build verification
54+
run: |
55+
echo "Verifying basic setup..."
56+
if [ ! -d "node_modules" ]; then
57+
echo "❌ node_modules not found"
58+
exit 1
59+
fi
60+
if [ ! -f "node_modules/.bin/tsc" ]; then
61+
echo "❌ TypeScript compiler not found"
62+
exit 1
63+
fi
64+
if [ ! -f "node_modules/.bin/webpack" ]; then
65+
echo "❌ Webpack not found"
66+
exit 1
67+
fi
68+
echo "✅ Basic setup verification successful"

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
. "$(dirname -- "$0")/_/husky.sh"
33

44
npm run hygiene
5+
npm run lint

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
"--extensionDevelopmentPath=${workspaceFolder}",
9393
"--extensionTestsPath=${workspaceFolder}/out/src/test",
9494
"--disable-extensions",
95+
"--user-data-dir=${workspaceFolder}/.vscode-test"
9596
],
9697
"preLaunchTask": "npm: test:preprocess",
9798
"smartStep": true,
@@ -101,12 +102,11 @@
101102
"type": "node",
102103
"request": "launch",
103104
"name": "Attach Web Test",
104-
"program": "${workspaceFolder}/node_modules/vscode-test-web/out/index.js",
105+
"program": "${workspaceFolder}/node_modules/@vscode/test-web/out/server/index.js",
105106
"args": [
106107
"--extensionTestsPath=dist/browser/test/index.js",
107108
"--extensionDevelopmentPath=.",
108109
"--browserType=chromium",
109-
"--attach=9229"
110110
],
111111
"cascadeTerminateToConfigurations": [
112112
"Launch Web Test"

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
".eslintrc.json": "jsonc",
55
".eslintrc.*.json": "jsonc"
66
},
7+
"json.schemas": [
8+
{
9+
"fileMatch": [
10+
"**/.eslintrc.*.json"
11+
],
12+
"url": "https://json.schemastore.org/eslintrc"
13+
}
14+
],
715
"files.trimTrailingWhitespace": true,
816
"gitlens.advanced.blame.customArguments": ["--ignore-revs-file", ".gitignore-revs"]
917
}

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ azure-pipeline.*
2828
yarn.lock
2929
**/*.map
3030
**/*.svg
31+
!**/output.svg
3132
!**/pr_webview.svg
3233
**/*.ts
3334
*.vsix

0 commit comments

Comments
 (0)