Back to Denoland

No With

lint/rules/no-with.md

latest379 B
Original Source

Disallows the usage of with statements.

The with statement is discouraged as it may be the source of confusing bugs and compatibility issues. For more details, see with - JavaScript | MDN.

Invalid:

typescript
with (someVar) {
  console.log("foo");
}