Reject @@jsxConfig versions other than 4
Why
Only JSX v4 exists, but @@jsxConfig stored any version, and any value other than 4 silently turned the JSX transform off for the rest of the file (#9132).
addedDiagnostic unsupported JSX version
@@jsxConfig({version: 3}) let x = <div />
diagnostic
Before
After
none; `<div />` stays an untransformed JSX node 1 │ @@jsxConfig({version: [3]}) Unsupported JSX version. Only `version: 4` is supported.
Review
- Does a non-React
module_still skip the check? No: it forced version 4 before and ignored the field; now aversionother than 4 is an error there too.