languages: Remove duplicate keywords in JS syntax highlighting (#48460)

Fixes an issue where syntax highlighting would be incorrect in certain
cases for JS, because of duplicate keyword definitions.

Release Notes:

- Fixed issue where certain keywords were incorrectly highlighted in JS
files
This commit is contained in:
Gaauwe Rombouts authored and GitHub committed 2026-02-05 12:23:39 +01:00
1 parent 233c0d37e7
commit f8b44cbbea
1 file changed
+14 -19
+14 -19
View File
@@ -243,18 +243,29 @@
)
[
"abstract"
"as"
"async"
"await"
"debugger"
"declare"
"default"
"delete"
"extends"
"get"
"implements"
"in"
"instanceof"
"keyof"
"module"
"namespace"
"new"
"of"
"override"
"private"
"protected"
"public"
"readonly"
"set"
"static"
"target"
@@ -270,6 +281,9 @@
"var"
"function"
"class"
"enum"
"interface"
"type"
] @keyword.declaration
[
@@ -308,25 +322,6 @@
(decorator "@" @punctuation.special)
; Keywords
[ "abstract"
"declare"
"enum"
"export"
"implements"
"interface"
"keyof"
"module"
"namespace"
"private"
"protected"
"public"
"type"
"readonly"
"override"
] @keyword
; JSX elements
(jsx_opening_element
[