From 76d98ad407a4e7017acbb0c1c195e9da988e53ba Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Mon, 10 Mar 2025 21:24:21 +0000 Subject: [PATCH] Bump `esversion` from 6 to 10 in JSHint config. 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 --- .jshintrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.jshintrc b/.jshintrc index 4caa7d2287..d830a103ee 100644 --- a/.jshintrc +++ b/.jshintrc @@ -3,7 +3,7 @@ "curly": true, "eqeqeq": true, "eqnull": true, - "esversion": 6, + "esversion": 10, "expr": true, "immed": true, "noarg": true,