stylelint-prettier
stylelint-prettier copied to clipboard
Ignored vue file style block?
What version of stylelint, prettier and stylelint-prettier are you using?
- stylelint: 15.10.2
- prettier: 3.0.2
- stylelint-prettier: 4.0.2
- node: 18.16.0
- npm: 9.5.1
Please paste any applicable config files that you're using (e.g. .prettierrc or .stylelintrc files)
No prettier config files.
.stylelintrc.json:
{
"extends": [
"stylelint-config-html",
"stylelint-config-recommended",
"stylelint-config-recommended-vue",
"stylelint-prettier/recommended"
],
"rules": {
"at-rule-no-unknown": null
}
}
What source code are you linting?
<style>
.insert {
display: block
}
.alter:after {color: red; content: 'example'}
.delete {
display: block;;
}
</style>
What did you expect to happen?
Output like README.
What actually happened?
Nothing happened.
Repo
https://github.com/ModyQyW/stylelint-prettier-322
npm install
npm run stylelint
If I run npm run prettier, I can see the output is correct. So I think it is caused by stylelint-prettier.
This appears to be intentional, see https://github.com/prettier/stylelint-prettier/blob/d9b427f5a9952b469fa41bf3e905a84baa65aa27/stylelint-prettier.js#L78-L98
I totally miss that. Thanks for pointing it out!
However, I think it is depressing. I have to run stylelint and prettier separately. Hope we can improve this. 🫡
Since Stylelint has decided to deprecate all the stylistic rules, I think it is better to run Stylelint and Prettier separately.