This repository was archived by the owner on Mar 4, 2025. It is now read-only.
-
-
Couldn't load subscription status.
- Fork 421
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
Stylelint not working out-of-the-box #1028
Copy link
Copy link
Open
Labels
Description
Version
create-nuxt-app: v5.0.0
Steps to reproduce
What is Expected?
When running yarn lint:style should not throw warning when nothing changed.
What is actually happening?
When running yarn lint:style I get the following error:
Invalid Option: Invalid value "consecutive-duplicates-with-different-syntaxes" for option "ignore" of rule "declaration-block-no-duplicate-properties"
This means it doesn't recognize the used class names in vue's template.
How I solved it?
I updated the dependencies of the following packages:
"stylelint": "^15.6.2"
"stylelint-config-recommended-vue": "^1.4.0"
"stylelint-config-standard": "^33.0.0"
Also, I removed stylelint-config-prettier.
the final stylelint should look like the following:
module.exports = {
customSyntax: 'postcss-html',
extends: [
'stylelint-config-standard',
'stylelint-config-recommended-vue'
],
// add your custom config here
// https://stylelint.io/user-guide/configuration
rules: {},
}found the solution in a problem in stylelint's issues in addition to the migration guide for stylelint v15 which stated:
you may no longer need to extend Prettier's Stylelint config as there should be no conflicting rules
josepcrespo, MatanelGordon, binodnepali, bongudth, VictorDragnea and 5 morebongudth and ferdn4ndobongudthmirumirumi, bongudth and duanlvxin

