Commit ee2b6bd
Editor: Switch from Esprima to Espree for JavaScript validation.
Replaces the outdated `esprima` parser with `espree` to provide support for modern JavaScript (ES6+) validation in the code editor. A new `espree` script handle is registered, and the `fakejshint` wrapper is updated to use it while maintaining the `esprima` handle for backward compatibility.
- Adds `espree` to `package.json`.
- Creates `tools/vendors/espree-entry.js` and adds a new Webpack entry point to bundle `espree`.
- Updates `fakejshint.js` to utilize `window.espree.parse` with ES6+ support.
- Registers `espree` in `script-loader.php` and updates `jshint` handle dependencies.
- Updates PHPUnit test data provider to include `espree`.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>1 parent 1535b0c commit ee2b6bd
7 files changed
Lines changed: 20 additions & 11 deletions
File tree
- src
- js/_enqueues/vendor/codemirror
- wp-includes
- tests/phpunit/tests/dependencies
- tools
- vendors
- webpack
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | | - | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1197 | 1197 | | |
1198 | 1198 | | |
1199 | 1199 | | |
1200 | | - | |
1201 | | - | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
1202 | 1203 | | |
1203 | 1204 | | |
1204 | 1205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3859 | 3859 | | |
3860 | 3860 | | |
3861 | 3861 | | |
| 3862 | + | |
3862 | 3863 | | |
3863 | 3864 | | |
3864 | 3865 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | | - | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
0 commit comments