[wp-trac] [WordPress Trac] #64562: JSHint: Bump esversion to 11 (es2020)

WordPress Trac noreply at wordpress.org
Wed Jan 28 05:50:23 UTC 2026


#64562: JSHint: Bump esversion to 11 (es2020)
------------------------------------------+--------------------
 Reporter:  westonruter                   |      Owner:  (none)
     Type:  defect (bug)                  |     Status:  new
 Priority:  normal                        |  Milestone:  7.0
Component:  Build/Test Tools              |    Version:  6.9
 Severity:  normal                        |   Keywords:
  Focuses:  javascript, coding-standards  |
------------------------------------------+--------------------
 In #63077, the `.jshintrc` had its `esversion`
 ([https://jshint.com/docs/options/#esversion docs]) bumped from 6 to 10.
 This enabled the use of async functions. However, there is also 11
 (ES2020) which includes features like:

 * Nullish Coalescing Operator (`??`): https://caniuse.com/wf-nullish-
 coalescing
 * Optional Chaining (`?.`): https://caniuse.com/mdn-
 javascript_operators_optional_chaining
 * And dynamic `import()`: https://caniuse.com/es6-module-dynamic-import

 These features are already being used in WordPress core for code pulled in
 from Gutenberg, as seen here:
 https://github.com/search?q=repo%3AWordPress%2FWordPress+%2F%5Cw%2B%5C%3F%5C.%5Cw%2B%7C%5C%3F%5C%3F%2F+language%3AJavaScript&type=code

 These features were all introduced in 2020. They are supported by the
 browsers that WordPress supports.

 It's time to update `.jshintrc` to recognize that the these JavaScript
 language features are blessed for usage.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64562>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list