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

[linter] wrong indentation reported when using multi line properties #22

Closed
Cactusbone opened this issue Dec 12, 2022 · 0 comments · Fixed by #23
Closed

[linter] wrong indentation reported when using multi line properties #22

Cactusbone opened this issue Dec 12, 2022 · 0 comments · Fixed by #23

Comments

@Cactusbone
Copy link

example inspired from https://stackoverflow.com/a/48514878/422995

case A

div
    box-shadow 0 0 0 black \
               1 0 0 black \
               0 0 1 black

aligning "columns" make it easier to read, however the stylus/indentation rule reports an error.

case B

div
    box-shadow \
    0 0 0 black \
    1 0 0 black \
    0 0 1 black

this passes the indentation rule, however it's harder to read

case C

div
    box-shadow \
        0 0 0 black \
        1 0 0 black \
        0 0 1 black

this looks okay to me, but does not pass the indentation rule

I'm not sure what the rule should be, but I think something like: "indented from the base rule" and "all line with the same indentation", without checking for how many indentation.

these could be configurable though.

In IntelliJ, the rules are named "Align when multiline", "Continuation indent" and "Align " (here it could be "Align parameters when multiline" for case A)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant