-
-
Notifications
You must be signed in to change notification settings - Fork 928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix autofix duplicated properties within comments #7429
Comments
@Zotova2008 Thanks for the report and for using the template. I've added a translation to your issue. Please create a minimum reproducible example so that we can best help you. Firstly, can you confirm this is an issue using the Stylelint CLI? If it is, then can you identify which part of the stylelint-config-htmlacademy config is triggering the problem as it uses the :
I suggest starting with just the built-in rules, if that fixes the issue, then add on the plugin pack, and then custom syntaxes until you can narrow down the cause. The issue may be triggered by combining a rule with one of the custom syntaxes. We'll only be able to fix the issue here if it's with Stylelint or one of the built-in rules. |
@jeddy3 Благодарю за перевод. Stylelint настроен на автоматическое форматирование при сохранении файлов. Убрала плагин с конфигурацией, Когда вернула обратно файл конфигурации,
проблема осталась только при форматировщике по умолчанию - Stylelint |
Thank you. That'll help a lot. |
Check readme for repro. Basically, it happens when using "--fix". |
@r2musings Thank you. I was able to reproduce a minimal demo using your repo. A comment with a colon triggers it. However, this only occurs for the default syntax and not for for postcss-less custom one. In your repo, the Stylelint config is set up for vanilla CSS. Can you configure it for Less to see it that helps, please: { "extends": ["stylelint-config-standard-less"] } @r2musings and @Zotova2008 If able, can you also share your complete Stylelint configuration files, please? |
@jeddy3 That did fix it! Thanks for looking at my demo and providing that solution. I appreciate it! |
|
@Zotova2008 Thank you. The config looks okay. Can you produce the problem using the CLI? npx stylelint "reboots.scss" --fix |
нет, баг не воспроизводится, свойства не дублируются |
@Zotova2008 Thank you for confirming. It's either a bug with the VSCode extension or your local configuration. Check that you haven't got a I'll close the issue here as it's unlikely to be an issue with the stylelint package because the CLI works. |
Такой |
What minimal example or steps are needed to reproduce the bug?
Scss. Основной форматировщик выбран Stylelint.
В настройках прописаны свойства.
Включение и отключение стандартного валидатора не влияет на ситуацию
(Scss. The main formatter selected is Stylelint.
The properties are specified in the settings.
Enabling and disabling the standard validator does not affect the situation)
при сохранении Stylelint начинает дублировать закомментированные свойства, при чем сколько раз сохранишь, столько же и добавит
(when saving, Stylelint begins to duplicate the commented out properties, and no matter how many times you save, the same number will be added)
What minimal configuration is needed to reproduce the bug?
How did you run Stylelint?
VS Code плагин Stylelint
(VS Code plugin Stylelint)
Which Stylelint-related dependencies are you using?
What did you expect to happen?
Ожидалось, что при сохранении файл отформатируется без дублирования свойств
(It was expected that when saving the file would be formatted without duplicating properties)
What actually happened?
Дублируются закомментрированные свойства
(Commented out properties are duplicated)
Do you have a proposal to fix the bug?
Как исправить не знаю
(I don’t know how to fix it)
The text was updated successfully, but these errors were encountered: