* fix: wrap module script content in block scope to isolate variables (#229357)
When multiple <script> tags exist in an HTML file, the HTML language
server concatenates their content into a single virtual JavaScript
document for validation. This causes false "Cannot redeclare
block-scoped variable" errors when <script type="module"> tags declare
variables with the same name as regular <script> tags, since module
scripts should have their own scope per the HTML spec.
Fix by wrapping <script type="module"> content in block scope delimiters
({ ... }) in the virtual document, preventing variable name collisions
between module scripts and regular scripts.
* fix: validate HTML module scripts separately
* test: cover HTML module script isolation
---------
Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
Fixed incorrect directory paths in json-language-features and html-language-features CONTRIBUTING.md files. The paths were missing hyphens which would cause command failures when users try to follow the documentation.
- Fixed: json-languagefeatures/server/ → json-language-features/server/
- Fixed: html-languagefeatures/server/ → html-language-features/server/
* html-language-features: include JSDoc summary and tags in <script> hover
In doHover for JavaScript embedded in HTML <script> blocks, surface
info.documentation (JSDoc summary) and info.tags (@param, @returns,
etc.) alongside the existing info.displayParts signature. The hover
now returns a MarkupContent markdown payload with the signature,
description, and tag sections so HTML files get parity with
.js/.ts hovers.
Fixes#268776
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* update
---------
Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Add argument parsing, suite filtering, and grep support to integration test scripts
- Add --run, --runGlob, --grep, --suite, and --help argument parsing
- --suite selects extension host test suites (comma-separated, glob patterns)
- --grep forwards test name filter to all runners via MOCHA_GREP env var
- Validate --suite filter matches at least one known suite
- Add MOCHA_GREP support to testrunner.js, CSS and HTML test runners
- Seed user settings to suppress dock bounce notifications
- Always apply *.integrationTest.js glob for node.js tests
- Add integration-tests skill documentation
* Address Copilot review feedback
- Quote cd $ROOT, rm -rf $VSCODEUSERDATADIR, rmdir %VSCODEUSERDATADIR%
- Quote --runGlob pattern to prevent premature glob expansion
- Use GREP_ARGS array for safe grep forwarding in .sh
- Use conditional call with proper quoting for grep in .bat
- Deduplicate suite list into KNOWN_SUITES variable
- Remove unused EXTRA_ARGS and ARGS variables from .bat
* Fix Windows CI: remove unnecessary enabledelayedexpansion
The original script used plain 'setlocal'. Adding 'enabledelayedexpansion'
may affect path resolution behavior on Windows CI. Since no delayed
expansion (\!var\!) syntax is used, revert to the original 'setlocal'.
* Fix Windows CI: capture %~dp0 before call :label corrupts it
In Windows batch, 'call :label' can change what %~dp0 resolves to.
Our should_run_suite subroutine uses 'call :should_run_suite', which
caused %~dp0 to resolve to the wrong directory for extension paths
that appear after the subroutine call. Capture the script directory
once at startup into %SCRIPT_DIR% and use it everywhere.
Update the built-in HTML sample snippet to follow current web standards
and reduce unnecessary boilerplate:
- Add lang attribute to <html> tag as first tab stop (W3C recommended)
- Remove outdated IE compatibility meta tag (IE is no longer supported)
- Remove unnecessary type='text/css' and media='screen' from <link>
(default values in HTML5)
- Remove <script> tag (modern templates often handle scripts differently)
- Move viewport meta before title (following common convention)
Fixes#272331
Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
Add html.suggest.hideEndTagSuggestions setting to allow users to
disable automatic end tag completion suggestions.
When enabled, prevents the completion provider from suggesting
closing tags for open elements (e.g., </body> when typing after <body>).
Fixesmicrosoft/vscode-html-languageservice#216
Signed-off-by: Giovanni Magliocchetti <giovimag123@gmail.com>
For #271167
This makes it so our built-in extensions can mostly be built using `tsc` on the command line. Previously the extensions were picking up a lot of typing info from the root `node_modules` that meant they weren't truly independent
For #269213
This adds a new eslint rule for `as any` and `<any>({... })`. We'd like to remove almost all of these, however right now the first goal is to prevent them in new code. That's why with this first PR I simply add `eslint-disable` comments for all breaks
Trying to get this change in soon after branching off for release to hopefully minimize disruption during debt week work