Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
strager opened this issue Dec 11, 2023 · 1 comment
Open

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

strager opened this issue Dec 11, 2023 · 1 comment
Labels
for hire Get paid for working on this task: https://quick-lint-js.com/hiring.html

Comments

@strager
Copy link
Collaborator

strager commented Dec 11, 2023

if (x)
  if (y)
    z();
else
  w();

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

Related: #282

@strager strager added the for hire Get paid for working on this task: https://quick-lint-js.com/hiring.html label Dec 11, 2023
@vegerot
Copy link
Contributor

vegerot commented Dec 11, 2023

A special case can be

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

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

@strager strager self-assigned this Dec 31, 2023
@strager strager removed their assignment Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for hire Get paid for working on this task: https://quick-lint-js.com/hiring.html
Projects
None yet
Development

No branches or pull requests

2 participants