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

Wrong indentation when running stylelint with auto fix #10

Open
juantxokupul opened this issue Jun 22, 2022 · 0 comments · May be fixed by #11
Open

Wrong indentation when running stylelint with auto fix #10

juantxokupul opened this issue Jun 22, 2022 · 0 comments · May be fixed by #11
Assignees
Labels
bug Something isn't working

Comments

@juantxokupul
Copy link
Member

Expected Behaviour

Stylelint autofix produces code with right indentation.

This

.ab {
  box-shadow: 0 0 0 1px #5b9dd9,
    0 0 2px 1px red;
}

after stylelint test/*.scss --fix is transformed into this

.ab {
  box-shadow:
    0 0 0 1px #5b9dd9,
    0 0 2px 1px red;
}

Actual Behaviour

Stylelint autofix produces code with no indentation.

This

.ab {
  box-shadow: 0 0 0 1px #5b9dd9,
    0 0 2px 1px red;
}

after stylelint test/*.scss --fix is transformed into this

.ab {
  box-shadow:
 0 0 0 1px #5b9dd9,
    0 0 2px 1px red;
}

Reproduce Scenario

Steps to Reproduce

  1. Add --fix option to lint script in package.json -> stylelint test/*.scss --fix

  2. Place this css inside test/index.scss

.ab {
  box-shadow: 0 0 0 1px #5b9dd9,
    0 0 2px 1px red;
}
  1. Run lint npm run lint

Solution

Remove "indentation": null rule setting inside index.js

juantxokupul pushed a commit that referenced this issue Jun 22, 2022
…dentation when autofix enabled in stylelint (#10)
@juantxokupul juantxokupul added the bug Something isn't working label Jun 22, 2022
@juantxokupul juantxokupul linked a pull request Jun 22, 2022 that will close this issue
@juantxokupul juantxokupul self-assigned this Jun 22, 2022
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

Successfully merging a pull request may close this issue.

1 participant