Skip to content

Fix custom-property-pattern false negatives for @property preludes #8430

@jeddy3

Description

@jeddy3

What minimal example or steps are needed to reproduce the bug?

@property --Foo {
  syntax: "string";
}

a {
  --Bar: a;
}

Ref: #7732 (comment)

What minimal configuration is needed to reproduce the bug?

{
  "extends": [
    "stylelint-config-standard"
  ]
}

How did you run Stylelint?

Demo

Which Stylelint-related dependencies are you using?

{
  "stylelint": "latest",
  "stylelint-config-standard": "latest"
}

What did you expect to happen?

Both custom property names to be flagged.

What actually happened?

Only the one inside of the ruleset is flagged:

6:2-7 error Expected custom property name "--Bar" to be kebab-case (custom-property-pattern)

Do you have a proposal to fix the bug?

Also check @property preludes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions