Skip to content

[eslint-plugin] Add rule to enforce usage of shared media queries and other constants #725

Open
@nmn

Description

@nmn

Depends on #724


If we implement a stylex.defineConsts API, we should also have a lint rule that enforces consistent usage of those constants in your codebase.

For example, you should be able to configure this lint rule to disallow any string media queries from being used and to enforce that all media queries are used by importing the shared media queries instead.

Advanced: File tree knowledge

The lint rule could discover all stylex.defineConsts definitions in your codebase and automatically error only when a value equal or close to a constant is used in the codebase. This can include all types of values (such as lengths, colors, and media queries)

Metadata

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