new-for-builtins
Configuration
rslint.config.ts
Rule Details
Many builtin constructors can be called with or without new, but constructor
calls are clearer and more consistent when they use new. This rule also
reports selected builtin namespace objects that are neither callable nor
constructible.
Optional calls that would need to become optional constructors are ignored,
because new cannot be optional.
Examples of incorrect code for this rule:
Examples of correct code for this rule: