[wp-trac] [WordPress Trac] #64661: Code Editor: Linting runs twice at initialization

WordPress Trac noreply at wordpress.org
Tue Mar 3 20:26:49 UTC 2026


#64661: Code Editor: Linting runs twice at initialization
--------------------------+--------------------------
 Reporter:  westonruter   |       Owner:  westonruter
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  7.0
Component:  General       |     Version:  4.9
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:  javascript
--------------------------+--------------------------
Changes (by westonruter):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 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/64661#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list