Prettier Linter Integration (advanced)
This extension will automatically detect when you have these extensions installed and use them instead of prettier by itself. For configuration of these linter integrations, see their respective documentation.
Where is the documentation for it?
I'm using prettier.stylelintIntegration and prettier.tslintIntegration now.
There's no alternative for prettier-stylelint. Stylelint does not recommend autofixing errors (stylelint --fix), as per docs:
Note: It's an experimental feature. It currently does not respect special comments for disabling stylelint within sources (e. g.
/* stylelint-disable */). Autofixing will be applied regardless of these comments.
Example:
/* stylelint-disable */
:export {
sizeLarge1X: 11;
sizeLarge2X: 12;
sizeRoot: 0;
sizeSmall1X: 1;
sizeSmall2X: 2;
}
becomes
/* stylelint-disable */
:export {
sizelarge1x: 11;
sizelarge2x: 12;
sizeroot: 0;
sizesmall1x: 1;
sizesmall2x: 2;
}
I got the same problem, I've followed the prettier docs to include Stylelint. But it looks like my own Stylelint config is ignored. .stylelintrc is as follows:
{
"extends": ["stylelint-rodesk", "stylelint-prettier/recommended"]
}
Autofixing Stylelint errors was working in version 2.3.0 with prettier.stylelintIntegration enabled. Can someone help out?
Haha I'm so sorry, had to reopen the tab that I was trying to lint it's working now! The only thing I had to add was prettier-stylelint to my package.json
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Haha I'm so sorry, had to reopen the tab that I was trying to lint it's working now! The only thing I had to add was
prettier-stylelintto mypackage.json