stylelint: Autofix not working
Describe the issue. Is it a bug or a feature request (new rule, new option, etc.)?
The auto fix is not working
Which rule, if any, is this issue related to?
all rules
What CSS is needed to reproduce this issue?
any SCSS
What stylelint configuration is needed to reproduce this issue?
{
"extends": "stylelint-config-standard",
"rules": {
"at-rule-empty-line-before": null
}
}
Which version of stylelint are you using?
8.1.1
How are you running stylelint: CLI, PostCSS plugin, Node API?
stylelint "**/*.scss" --syntax scss --fix
Does your issue relate to non-standard syntax (e.g. SCSS, nesting, etc.)?
SCSS.
What did you expect to happen?
Autofixing to work
What actually happened (e.g. what warnings or errors you are getting)?
No Autofixing
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (8 by maintainers)
Tip : you can use npx 😃 (if you have npm > 5.2, you have npx)
npx stylelint "**/*.scss" --fixAutofixing is available for a limited amount of rules. What rules exactly aren’t autofixed?
Problem found & fixed 😃 I uninstalled the global version and now things work. for future researchers: the command to use local should be similar to
Trying
npx stylelint "foo/*.css" --fixDoesn’t work. Windows 8.1, VS Code. NPM installed locally.Good stuff! I’m glad you got it working. The local/global install stuff does pop-up occasionally and I just remembered it.
NPM should move the executable to a
.binfolder for you, and so the following should suffice to run the local package: