Skip to content

Add hygiene rule to prevent js files - #321165

Merged
Alex Ross (alexr00) merged 2 commits into
mainfrom
alexr00/stable-parrotfish
Jun 12, 2026
Merged

Alex Ross (alexr00) merged 2 commits into
mainfrom
alexr00/stable-parrotfish

Conversation

@alexr00

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 12, 2026 15:16
@alexr00 Alex Ross (alexr00) self-assigned this Jun 12, 2026
@alexr00
Alex Ross (alexr00) marked this pull request as ready for review June 12, 2026 15:16
@alexr00
Alex Ross (alexr00) enabled auto-merge (squash) June 12, 2026 15:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR centralizes the repository’s legacy JavaScript allowlist into a CODEOWNERS-gated file and enforces “no new JS” both via ESLint and build hygiene checks (including coverage for files excluded by .eslint-ignore).

Changes:

  • Move the JS/CJS/MJS allowlist out of eslint.config.js into a new .eslint-allowed-javascript-files file.
  • Add a hygiene check (checkNoNewJavaScriptFiles) and wire it into both the gulp hygiene flow and the pre-commit hygiene entrypoint.
  • Add CODEOWNERS protection for .eslint-allowed-javascript-files.
Show a summary per file
File Description
eslint.config.js Reads .eslint-allowed-javascript-files and uses it as the ignore allowlist for the “no new JS files” rule.
build/hygiene.ts Adds checkNoNewJavaScriptFiles() and runs it from the pre-commit hygiene path when relevant files are staged.
build/gulpfile.hygiene.ts Runs checkNoNewJavaScriptFiles() as part of the check-package-json task.
.github/CODEOWNERS Requires review for changes to .eslint-allowed-javascript-files.
.eslint-allowed-javascript-files New allowlist file containing the pre-existing JS/CJS/MJS files.

Copilot's findings

  • Files reviewed: 5/5 changed files
  • Comments generated: 2

Comment thread eslint.config.js Resolved
Comment thread eslint.config.js Resolved
@alexr00
Alex Ross (alexr00) merged commit 23b5567 into main Jun 12, 2026
25 checks passed
@alexr00
Alex Ross (alexr00) deleted the alexr00/stable-parrotfish branch June 12, 2026 16:03
@vs-code-engineering vs-code-engineering Bot added this to the 1.125.0 milestone Jun 12, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Jul 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants