new-parens
May 2, 2018 ยท View on GitHub
:wrench: fixable
Requires parentheses when invoking costructors.
Rationale
When invoking constructors without arguments you can omit the parentheses. In addition TypeScript requires parentheses when passing type arguments. In order to make constructor calls more explicit and easier to recognise you should always use parentheses.
Examples
:thumbsdown: Examples of incorrect code
new Set;
new Set<number>; // this is already a compiler error
:thumbsup: Examples of correct code
new Set();
new Set<number>();