Skip to content

Prefer boolean prop usage at first #1870

Closed
@jd-solanki

Description

@jd-solanki

Please describe what the rule should do:
This rule is related to this rule. In the existing rule we are enforcing defining the boolean rules first but in this rule, we can enforce using boolean props first.

What category should the rule belong to?

[x] Enforces code style (layout)
[ ] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

   <!-- GOOD -->
    <v-btn
      flat
      color="success"
    >
      Success
    </v-btn>

   <!-- BAD -->
    <v-btn
      color="info"
      flat
    >
      Info
    </v-btn>

   <!-- GOOD -->
    <v-btn
      flat
      variant="outilned"
      color="success"
      rounded="pill"
    >
      Success
    </v-btn>

Additional context
Placing boolean prop usage on top makes it easy to read the component props. 👀

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions