Skip to content

customize chakra-ui/props-order #64

@hexiro

Description

@hexiro

Hello! just have a few suggestions to leave here about how I believe this rule can be more like eslint-plugin-react's jsx-sort-props, only more specific to chakra.

I think it would be cool if like jsx-sort-props, one could sort with options like callbacksLast and shorthandFirst. for chakra-specific use case it would also be cool to have something like pseudoFirst so that one could choose if they want it at the beginning or the end.

Additionally, (this is a lot more complex) it would be cool if there was an option called something like uniqueFirst which moves unique props specific to that element to the front. For example, on a Flex element, align, justify, and direction props would show up before props that aren't specific to Flex.

Let me know what you think!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions