You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
The implementation of no-unused-new seems overly complicated. It looks inside of an expression for a new subexpression. This apparently catches 5 + new Foo(), but that's not really useful. The type checker will catch that and so will no-unused-expression. Why not deprecate no-unused-new and make it an option of no-unused-expression?
Integrate `no-unused-new` into this rule.
[new-rule-option] `allow-new-side-effects` restores the old behaviour to allow `new` for side effects
[bugfix] allow comma separated assignments
Fixes: #2058
[bugfix] allow indirect eval: `(0, eval)("");`
[enhancement] checking for unused new can now use option `allow-fast-null-checks`
Fixes: #1839
[enhancement] find unused comma separated expressions in all locations of the code
[enhancement] find unused expressions inside void expression
Bug Report
4.0.2
2.1.4
TypeScript code being linted
with
tslint.json
configuration:Actual behavior
[tslint] do not use 'new' for side effects (no-unused-new)
Expected behavior
No lint error
The text was updated successfully, but these errors were encountered: