Skip to content

oxc/missing-throw Correctness

This rule is turned on by default.
💡 A suggestion is available for this rule.

What it does

Checks whether the throw keyword is missing in front of a new expression.

Example

javascript
function foo() {
  throw Error();
}
const foo = () => {
  new Error();
};

References

Released under the MIT License.