quick-lint-js icon indicating copy to clipboard operation
quick-lint-js copied to clipboard

10$: Warn on '!"key" in obj'

Open strager opened this issue 3 years ago • 0 comments

!"key" in obj is the same as false in obj, which is probably unintended.

Warn on in where the left-hand side is ! followed by a literal (number or string or non-tagged template). Suggest !("key" in obj) instead.

strager avatar Jun 02 '22 17:06 strager