tslint-consistent-codestyle
tslint-consistent-codestyle copied to clipboard
Add rule to detect useless blocks
trafficstars
Useless blocks
- don't have a label
- are contained in other block-like Nodes
- excludes block as children of IterationStatement, IfStatement, WithStatement, TryStatement, ArrowFunction
- maybe exclude blocks in CatchOrDefaultClause (if it's the only statement in there)
- don't contain block scoped declarations
That idea came up in #103