Repository navigation
Add hygiene rule to prevent js files - #321165
Merged
Merged
Conversation
Alex Ross (alexr00)
marked this pull request as ready for review
June 12, 2026 15:16
Alex Ross (alexr00)
enabled auto-merge (squash)
June 12, 2026 15:16
Contributor
There was a problem hiding this comment.
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.jsinto a new.eslint-allowed-javascript-filesfile. - 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
TylerLeonhardt
approved these changes
Jun 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.