Commit 56bce91
committed
refactor(linter/plugins): shorten code in tokens methods (#16073)
Pure refactor. Shorten code in token methods.
The diff is large, but it's purely:
1. Remove redundant `else` clauses where the `if` block always `return`s.
2. Use early `return` where possible to reduce `if` / `else` nesting.
3. Compress short `if (condition) { doStuff(); }` blocks to single line `if (condition) doStuff();`
No behavioral changes at all - simply syntactical transform. The last one in particular is personal stylistic preference really - I just find compressing short `if` statements to a single line makes the code easier to scan.1 parent 0e1d38a commit 56bce91
1 file changed
+185
-298
lines changed
0 commit comments