quick-lint / quick-lint-js

quick-lint-js finds bugs in JavaScript programs
https://quick-lint-js.com
GNU General Public License v3.0
1.52k stars 191 forks source link

30$: report misleading indentation for braceless if/etc. #1113

Open strager opened 9 months ago

strager commented 9 months ago
if (x)
  if (y)
    z();
else
  w();

quick-lint-js should warn that the else should be indented.

Related: #282

vegerot commented 9 months ago

A special case can be

if (x)
  y();
  z();

quick-lint should warn that z() is indented but is not part of the if