Skip to content

Build/Test Tools: Add xfn.js, language-chooser.js, and sanitize.js to TypeScript checking - #16117

Open
faisalahammad wants to merge 1 commit into
WordPress:trunkfrom
faisalahammad:ticket/66751-typecheck-clean-files
Open

faisalahammad wants to merge 1 commit into
WordPress:trunkfrom
faisalahammad:ticket/66751-typecheck-clean-files

Conversation

@faisalahammad

@faisalahammad faisalahammad commented Nov 19, 2026 •

Copy link
Copy Markdown

Adds three files to TypeScript checking in tsconfig.json:

  • src/js/_enqueues/admin/xfn.js
  • src/js/_enqueues/lib/language-chooser.js
  • src/js/_enqueues/wp/sanitize.js

All three already pass the existing strict configuration, so this only changes tsconfig.json. The files list stays sorted.

Trac ticket: https://core.trac.wordpress.org/ticket/66751

Testing Instructions

  1. Run npm run typecheck:js and confirm there are no errors.
  2. Run npx tsc -p tsconfig.json --listFilesOnly | grep -E 'xfn|language-chooser|sanitize' and confirm all three files are listed.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude desktop app (Claude Code)
Model(s): Claude Opus 5.5
Used for: Measuring TypeScript errors per file to find files that already pass, updating tsconfig.json, running the checks, and writing this description.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

…js` to TypeScript checking.

These files already pass the existing strict TypeScript configuration, so no source changes are needed.

See #66751.
@faisalahammad
faisalahammad marked this pull request as ready for review November 19, 2026 21:07
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Core Committers: Use this line as a base for the props when committing in SVN:

Props faisalahammad.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub or WordPress.org user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@lancewillett
lancewillett requested a lite review from Copilot November 19, 2026 23:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

@lancewillett lancewillett left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I verified that all three files enter the compiler’s file list and that npm run typecheck:js passes. As a separate check, I introduced a misspelled jQuery or DOM method in each file locally. TypeScript reported each one. Approved for 7.3.

AI review · gpt-6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

3 participants