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

The first line of a multiline // comment is outdented incorrectly #1

Open
garraflavatra opened this issue Jul 27, 2023 · 3 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@garraflavatra
Copy link
Owner

When I lint the following code:

if {...} 
else {
  for (let r = range.t; r <= range.b; r++) {
    for (let c = range.l; c <= range.r; c++) {
      ensureCellExists(r, c);
      doc.sheets[sheet].cells[r][c][key] = newVal;

      // Caluclate row height and cell width override based on text
      // updateTextOverrides(r, c);
    }
  }
}

the linter outdents the first line with the // Caluclate row height and cell width override based on text comment with one level. The other line containing a comment is leaved as is.

The expected behaviour is that both lines stay indented by 3 levels instead of outdenting the first as described.

@garraflavatra garraflavatra added the bug Something isn't working label Jul 27, 2023
@garraflavatra garraflavatra self-assigned this Jul 27, 2023
@garraflavatra
Copy link
Owner Author

Ouch. This is definitely a bug indeed, or at least not the desired behaviour.

Thanks for reporting this; I'll create a ticket in sveltejs/eslint-plugin-svelte today.

@garraflavatra
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants