Repository navigation
Fix Guardian ESLint parse errors in runtime extensions - #413
Merged
Vladimir Morozov (vmoroz) merged 1 commit intoNov 12, 2026
Merged
Conversation
Guardian runs ESLint 7 with its default ES5 parser, so the standalone runtime extensions that use class and new.target fail to parse, and the header/footer IIFE fragments cannot parse on their own. Set ecmaVersion 2021 for the SDL ESLint scan in the build and release pipeline templates, and exclude only the two wrapper fragments. The other runtime extensions remain scanned by the SDL required rules.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the ESLint parsing and wrapper-fragment exclusion changes.
No open issues 🎉
What changed in this PR
This PR addresses Guardian ESLint parse failures by enabling ES2021 parsing and excluding incomplete wrapper fragments, while keeping complete runtime extensions covered by existing security rules.
Changes:
- Configure ES2021 parsing in the build and release pipelines.
- Exclude only the extension header and footer fragments in addition to existing exclusions.
- Correct the ignore-file comments to clarify that runtime extensions remain scanned.
| File | Description |
|---|---|
.eslintignore |
Excludes the two wrapper fragments and clarifies scan coverage. |
.ado/release-pipeline.yml |
Adds ES2021 parser settings for consistency; no ESLint task currently runs here. |
.ado/build-template.yml |
Enables ES2021 parsing for Guardian ESLint in PR and CI builds. |
Review effort: Balanced
Benchmark ResultsTotal benchmarks: 204 Inputs: baseline/baseline.json, bench_result.json v8 (6176ms, 5396ms) -12.6%
test-suites (317886ms, 304415ms) -4.2%
micros (60876ms, 60488ms) -0.6%
jit-benches (8563ms, 6310ms) -26.3%
many-subclasses (73437ms, 81212ms) +10.6%
map-objects (3627ms, 1984ms) -45.3%
map-strings (4335ms, 2286ms) -47.3%
nbody (3448ms, 2892ms) -16.1%
string-switch (6503ms, 6647ms) +2.2%
raytracer (5608ms, 5623ms) +0.3%
MiniReact (30332ms, 21818ms) -28.1%
widgets (12934ms, 12771ms) -1.3%
|
Vladimir Morozov (vmoroz)
enabled auto-merge (squash)
November 11, 2026 23:41
Nikolai Aristov (NikoAri)
approved these changes
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Guardian's ESLint scan fails on modern JavaScript syntax and incomplete extension
wrapper fragments, leaving otherwise successful builds partially successful.
complete runtime extensions remain checked by the existing SDL security rules.
which the build concatenates around the scanned extensions.
Test Plan
Ran Guardian's ESLint 7.32.0 command with the SDL 0.1.7 required rules from the
checkout's parent directory. It exits 0 with no messages, scans the six complete
runtime extension and ARM64 stress scripts, and ignores only the two wrapper
fragments. Without the parser option, the same command still fails to parse.
The CI pipeline passed on this commit. Guardian ESLint ran with
--parser-options=ecmaVersion:2021and exited 0. Its SARIF lists the same sixfiles, with no results or parse errors. No task failed or finished with issues.
Pipeline previews show the option in the PR and CI pipelines. The release
pipeline accepts it, but runs no ESLint task today, so it is set there only for
consistency.
Microsoft Reviewers: Open in CodeFlow