[wp-trac] [WordPress Trac] #64662: Add TypeScript static analysis for core JavaScript files
WordPress Trac
noreply at wordpress.org
Tue Mar 3 20:26:49 UTC 2026
#64662: Add TypeScript static analysis for core JavaScript files
------------------------------+--------------------------
Reporter: westonruter | Owner: westonruter
Type: task (blessed) | Status: accepted
Priority: normal | Milestone: 7.0
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: | Focuses: javascript
------------------------------+--------------------------
Comment (by westonruter):
In [changeset:"61800" 61800]:
{{{
#!CommitTicketReference repository="" revision="61800"
Code Editor: Improve types and fix options handling to avoid double-
linting at initialization.
* Refactor how CodeMirror is initialized so that the full settings are
provided up-front. This avoids the linting from being applied twice at
initialization, the first time with an incorrect configuration.
* Add initial TypeScript configuration for core with `npm run
typecheck:js`.
* Add comprehensive types for code editor files: `code-editor.js`,
`javascript-lint.js`, and `htmlhint-kses.js`.
* Move code editor scripts from `src/js/_enqueues/vendor/codemirror/` to
`src/js/_enqueues/lib/codemirror/`. The CodeMirror library is sourced from
the npm package as of r61539.
* Remove (deprecated) `esprima.js` from being committed to SVN since in
r61539 it was switched to using the npm package as its source.
* Move `fakejshint.js` to `src/js/_enqueues/deprecated`.
Developed in https://github.com/WordPress/wordpress-develop/pull/10900
Follow up to r61611, r61539.
Props westonruter, jonsurrell, justlevine.
See #64662, #48456.
Fixes #64661.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64662#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list