tools: lint Temporal global

PR-URL: https://github.com/nodejs/node/pull/60793
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
René
2025-11-22 11:56:28 +00:00
committed by GitHub
parent 45eeb6f88c
commit fb6b83c9ef

View File

@@ -230,6 +230,12 @@ export default [
name: 'SharedArrayBuffer',
message: "Use `const { constructSharedArrayBuffer } = require('internal/util');` instead of the global.",
},
// Temporal is not available in primordials because it can be
// disabled with --no-harmony-temporal CLI flag.
{
name: 'Temporal',
message: 'Use `const { Temporal } = globalThis;` instead of the global.',
},
{
name: 'TextDecoder',
message: "Use `const { TextDecoder } = require('internal/encoding');` instead of the global.",