Skip to content

Stylelint not working out-of-the-box #1028

Open
@MatanelGordon

Description

Version

create-nuxt-app: v5.0.0

Steps to reproduce

image

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:

image

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions