diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-10-28 23:55:51 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-29 00:55:51 +0100 |
| commit | 484f8ca9c30909914eb3348b2df10d44e2753248 (patch) | |
| tree | 352f3e7c7e0e6d3354438d94e77fca1abc911fe6 /tests/specs/lint | |
| parent | 0e641632c38383a1d67aa610867496f64ae423ca (diff) | |
fix: provide hints in terminal errors for Node.js globals (#26610)
Add info/hint for terminal errors related to Node.js globals:
- __filename
- __dirname
- Buffer
- global
- setImmediate
- clearImmediate
Closes https://github.com/denoland/deno/issues/17494
Diffstat (limited to 'tests/specs/lint')
| -rw-r--r-- | tests/specs/lint/node_globals_no_duplicate_imports/main.out | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/specs/lint/node_globals_no_duplicate_imports/main.out b/tests/specs/lint/node_globals_no_duplicate_imports/main.out index 56df10eba..058b80795 100644 --- a/tests/specs/lint/node_globals_no_duplicate_imports/main.out +++ b/tests/specs/lint/node_globals_no_duplicate_imports/main.out @@ -2,3 +2,6 @@ error: Uncaught (in promise) ReferenceError: setImmediate is not defined const _foo = setImmediate; ^ at [WILDCARD]main.ts:3:14 + + info: setImmediate is not available in the global scope in Deno. + hint: Import it explicitly with import { setImmediate } from "node:timers";. |
