Open Shaderpixel opened 6 years ago
Having the same issue when using the fix option. I'm using gulp 4.0.
Hello. Sorry for being absent. I'll try to take a look at it when I have some time (hopefully this weekend).
Hello, are you using any other plugins? The reason I ask is it could be a specific rule which is causing this issue.
I had the same problem you described so I removed all the rules after which I could no longer replicate the issue. I gradually added the rules back and narrowed my issue down to the stylelint-declaration-strict-value plugin.
I made the subsequent change to the config and no longer have the issue:
const stylelintStrictValueRules = {
'scale-unlimited/declaration-strict-value': [
['/color$/'], {
- disableFix: false,
+ autoFixFunc: () => null,
},
],
}
In my scss file, I noticed that when I accidentally left some letters after the semicolon like so:
color: red;asdf
, gulp-stylelint would replace the entire scss file content with a report string when I setfix: true
. My scss file after running gulp-stylelint, losing all of my scss styles:I am not sure if its just my set up but I have tried postcss stylelint with the fix option set to true and it did not overwrite my entire file like gulp-stylelint did. It would be nice to get this fixed as gulp-stylelint has better reporting capabilities. Any ideas? Here's my gulp-stylelint task :