prefer-global/text-decoder
UnreleasedConfiguration
rslint.config.ts
Enforces consistent use of the global TextDecoder or the TextDecoder export from Node.js's util module.
Options
"always"(default): use the globalTextDecoder."never": useTextDecoderfromutilornode:util.
The rule recognizes CommonJS require, process.getBuiltinModule, and ES module imports and re-exports. It follows aliases and static property access, and respects shadowed or disabled globals. It does not provide automatic fixes or suggestions.
always
Examples of incorrect code:
Examples of correct code:
never
Examples of incorrect code:
Examples of correct code: