Skip to content

Fix custom-property-no-missing-var-function false positives for properties that can contain author-defined identifiers #5742

Closed
@CyanSalt

Description

What is the problem you're trying to solve?

Thanks to the CSS Houdini API, the property name of a custom property could appear in the value of some declarations, such as transition (or more precisely, transition-property). However, the current custom-property-no-missing-var-function rule will report errors for these custom property names that are not wrapped in var().

Online demo

What solution would you like to see?

One possibility is to not report transition, etc. by default, but this could also produce breaking changes.

It is also possible to add options to the rule to ignore certain property names, as we did in property-no-vendor-prefix.

module.exports = {
  rules: {
    'custom-property-no-missing-var-function': [true, { ignoreProperties: ['transition', 'transition-property'] }],
  }
}

Metadata

Assignees

No one assigned

    Labels

    status: wipis being worked on by someone

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions