What it flags
throw of a string, template, number, object literal, array, boolean, null or global undefined gives no stack trace and fails instanceof Error checks in callers. Throw an Error or a subclass. Thrown variables and call results are not judged.
A parser can use a private sentinel when the nearest catch consumes the thrown value and returns a fallback. A catch that passes the value on or rethrows it keeps the diagnostic.
How to review or fix
Select a plain string literal finding individually to preview wrapping it in a built-inError. The preview requires the compiler to resolve the built-in constructor and the project sources to have no detected writes to that binding. Before applying the edit, Loadwise checks the project file inventory and the source text used to build the preview. The editor checks open buffers as well as saved files and limits how many files and bytes it reads for one edit. Catch handlers then receive an object. Review any equality or type checks that depend on the original string.
Configuration
Set the rule to"off" in loadwise.config.json to drop its findings: