csstools / stylelint-use-nesting

Enforce nesting when it is possible in CSS
Creative Commons Zero v1.0 Universal
41 stars 8 forks source link

Unknown rule csstools/use-nesting #19

Closed physphile closed 3 months ago

physphile commented 4 months ago

My .stylelintrc.yaml:

extends:
  - stylelint-config-standard
  - stylelint-config-recess-order
  - stylelint-use-nesting
rules:
  color-function-notation: modern
  selector-class-pattern: null
  csstools/use-nesting: always

The npx stylelint "**/*.css" command always reports Unknown rule csstools/use-nesting problem. How to fix it?

romainmenke commented 3 months ago

You also need to declare the plugin. A JSON config could look like this:

{
  "plugins": [
    "stylelint-use-nesting"
  ],
  "rules": {
    "csstools/use-nesting": ["always"]
  }
}