Fix deletion of code with --fix option
See original GitHub issueI tried the minimum configuration.
package.json
{
"dependencies": {
"stylelint": "^9.4.0"
}
}
.stylelintrc
{
"rules": {
}
}
ex1
app.sass
.ToggleSwitch
@extend .hoge
CLI with yarn run stylelint app.sass --fix
yarn run stylelint app.sass
Unexpected changes will be made
ex2
app.sass
.ToggleSwitch
@extend .hoge
@include .fuga
padding: 0 $width
border: 1px solid $border-color
CLI with yarn run stylelint app.sass --fix
yarn run stylelint app.sass
Unexpected changes will be made
.ToggleSwitch
padding: 0 $width
border: 1px solid border-color
thx
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:11 (4 by maintainers)
Top Results From Across the Web
4 Ways to Solve the Cannot Delete Files Error
Step 2: Now click on "Troubleshoot" > "Advanced options" > "Startup Settings" ... These are some of the typical ways of fixing cannot...
Read more >6 Ways to Fix the “Could Not Find This Item” Deletion Error in ...
To delete a file or folder using Eraser on Windows 10, right-click on it and select Eraser > Erase. On Windows 11, right-click...
Read more >Windows Scan And Fix Deleted Files – Problem Solved
Be Ready to Recover Deleted Files from Scan and Fix · By clicking on the former option, you can see all partition on...
Read more >Quick and Easy Solution! Delete option missing can't delete files
diy #computerhelp # delete #windowshelpSometimes you may find that the delete option is missing when you right click mouse on a file or ......
Read more >eslintcache is deleted when auto-fix is performed #635 - GitHub
I think the solution here is to add an option like Preserve ESLint cache , which would add --cache when performing a fix....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This issue is likely due to to a problem in
postcss-sass
, which stylelint uses:Please consider contributing a fix upstream to resolve this issue.
I’ll add an “upstream” label to indicate this.
We added a feature in 13.2.0 to workaround these types of upstream parser issues:
If you’re unable to contribute to the upstream parser, please consider contributing a workaround to stylelint itself so that autofix becomes safer to use with sass syntax.
I’m having the same issue when using sass + fix option.
Here are some more examples that might be helpful:
this won’t even break because navy is a preset color lol