Skip to content

Wrong indentation when running stylelint with auto fix #10

@juantxokupul

Description

@juantxokupul

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions