Commit 5427ce8
feat: enforce ECMAScript-only globals in test files via ESLint (#30)
* Enforce ECMAScript-only globals in test files via ESLint
Add an allowlist-based ESLint config using globals.es2025 plus the CTS
harness globals (assert, loadAddon, mustCall, mustNotCall, gcUntil).
Any runtime-specific API (setTimeout, process, Buffer, etc.) now triggers
a no-undef error in tests/**/*.js files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add experimentalFeatures global and ban globalThis/global access in tests
- Add experimentalFeatures to the allowed CTS harness globals
- Add no-restricted-syntax rule to flag globalThis.* and global.* access,
ensuring tests use CTS harness globals (e.g. gcUntil) instead
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent ebd91a5 commit 5427ce8
3 files changed
+38
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
7 | 22 | | |
8 | | - | |
| 23 | + | |
9 | 24 | | |
10 | 25 | | |
11 | 26 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
15 | 31 | | |
16 | 32 | | |
17 | 33 | | |
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 | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
0 commit comments