hugomrdias / prettier-stylelint

code > prettier > stylelint > formatted code
MIT License
175 stars 29 forks source link

Comments // stylelint-disable-line and /* prettier-ignore */ are ignored #27

Open elkinuk opened 5 years ago

elkinuk commented 5 years ago

After starting prettier-stylelint --write it is expected, that lines, marked like disabled or ignored, wouldn't be changed. But they are changing.

P.S: To .stylelintrc was added

"extends": "./node_modules/prettier-stylelint/config.js"

Everything was done like in the tutorial

isellsoap commented 5 years ago

@elkinny I digged a bit into it and found out that the underlying issue is not caused by this repository, but by stylelint itself. stylelint doesn’t respect /* stylelint-disable */ comments when doing the autofix operation. The issue where this is tracked is https://github.com/stylelint/stylelint/issues/2643. The latest update with the issue is this comment: https://github.com/stylelint/stylelint/issues/3867#issuecomment-450949484.

Long story short: // prettier-ignore is being respected, but as the stylelint autofix command is being executed as the last command this doesn’t help (as pointed out above).