Bump esversion from 6 to 10 in JSHint config.
Some checks are pending
Cleanup Pull Requests / Clean up pull requests (push) Waiting to run
Coding Standards / PHP coding standards (push) Waiting to run
Coding Standards / JavaScript coding standards (push) Waiting to run
Coding Standards / Slack Notifications (push) Blocked by required conditions
Coding Standards / Failed workflow tasks (push) Blocked by required conditions
End-to-end Tests / Test with SCRIPT_DEBUG disabled (push) Waiting to run
End-to-end Tests / Test with SCRIPT_DEBUG enabled (push) Waiting to run
End-to-end Tests / Slack Notifications (push) Blocked by required conditions
End-to-end Tests / Failed workflow tasks (push) Blocked by required conditions
JavaScript Tests / QUnit Tests (push) Waiting to run
JavaScript Tests / Slack Notifications (push) Blocked by required conditions
JavaScript Tests / Failed workflow tasks (push) Blocked by required conditions
Local Docker Environment / Build Test Matrix (push) Waiting to run
Local Docker Environment / PHP ${{ matrix.php }} (push) Blocked by required conditions
Local Docker Environment / Slack Notifications (push) Blocked by required conditions
Local Docker Environment / Failed workflow tasks (push) Blocked by required conditions
Performance Tests / Determine Matrix (push) Waiting to run
Performance Tests / ${{ matrix.multisite && 'Multisite' || 'Single Site' }} ${{ matrix.memcached && 'Memcached' || 'Default' }} (push) Blocked by required conditions
Performance Tests / Compare (push) Blocked by required conditions
Performance Tests / Slack Notifications (push) Blocked by required conditions
Performance Tests / Failed workflow tasks (push) Blocked by required conditions
PHP Compatibility / Check PHP compatibility (push) Waiting to run
PHP Compatibility / Slack Notifications (push) Blocked by required conditions
PHP Compatibility / Failed workflow tasks (push) Blocked by required conditions
PHPUnit Tests / PHP 7.2 (push) Waiting to run
PHPUnit Tests / PHP 7.3 (push) Waiting to run
PHPUnit Tests / PHP 7.4 (push) Waiting to run
PHPUnit Tests / PHP 8.0 (push) Waiting to run
PHPUnit Tests / PHP 8.1 (push) Waiting to run
PHPUnit Tests / PHP 8.2 (push) Waiting to run
PHPUnit Tests / PHP 8.3 (push) Waiting to run
PHPUnit Tests / PHP 8.4 (push) Waiting to run
PHPUnit Tests / html-api-html5lib-tests (push) Waiting to run
PHPUnit Tests / Slack Notifications (push) Blocked by required conditions
PHPUnit Tests / Failed workflow tasks (push) Blocked by required conditions
Test Build Processes / Core running from build (push) Waiting to run
Test Build Processes / Core running from src (push) Waiting to run
Test Build Processes / Gutenberg running from build (push) Waiting to run
Test Build Processes / Gutenberg running from src (push) Waiting to run
Test Build Processes / Slack Notifications (push) Blocked by required conditions
Test Build Processes / Failed workflow tasks (push) Blocked by required conditions
Upgrade Develop Version Tests / Build (push) Waiting to run
Upgrade Develop Version Tests / Upgrade from 4.9 (push) Blocked by required conditions
Upgrade Develop Version Tests / Upgrade from 6.5 (push) Blocked by required conditions
Upgrade Develop Version Tests / Upgrade from 6.6 (push) Blocked by required conditions
Upgrade Develop Version Tests / Upgrade from 6.7 (push) Blocked by required conditions
Upgrade Develop Version Tests / Slack Notifications (push) Blocked by required conditions
Upgrade Develop Version Tests / Failed workflow tasks (push) Blocked by required conditions

The current `esversion` 6 corresponds to an ECMAScript version from a decade ago (2015). Updating from 6 to 10 allows the following features to be used in Core JS: the exponentiation operator, async functions, shared memory, atomics, asynchronous iteration, rest/spread properties, various RegExp extensions, and optional catch bindings. These features have been supported by all browsers (except for IE11) well beyond WordPress's browser support policy. This also brings Core's allowed ES version closer in line with Gutenberg which is currently using features like async functions.

Props westonruter, swissspidy, mukesh27.
Fixes #63077.


git-svn-id: https://develop.svn.wordpress.org/trunk@59963 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2025-03-10 21:24:21 +00:00
parent a834d96507
commit 76d98ad407

View File

@ -3,7 +3,7 @@
"curly": true,
"eqeqeq": true,
"eqnull": true,
"esversion": 6,
"esversion": 10,
"expr": true,
"immed": true,
"noarg": true,