no-lone-blocks
Configuration
rslint.config.ts
Rule Details
This rule disallows nested (non-function) lone blocks. A lone block is a block that is not part of an if, for, while, function, try, class static block, or other statement that naturally introduces one. In ES6+, a block can be useful to scope let, const, class, function, or using declarations — this rule only flags blocks that do not contain such block-scoped bindings.
Examples of incorrect code for this rule:
Examples of correct code for this rule: