Skip to content

Rule enhancement: vue/attributes-order #968

@sense-it-gmbh

Description

@sense-it-gmbh

Please describe what the rule should do:

Enforce alphabetic order within attributes of same block (eg DEFINITION, LIST_RENDERING, see rule details). This concerns mainly the custom attributes and directives, events and global attributes (OTHER_DIRECTIVES, OTHER_ATTR, GLOBAL, EVENTS).

This could be an optional rule-option.

What category should the rule belong to?

  • Enforces code style
  • Warns about a potential error
  • Suggests an alternate way of doing something
  • Other (please specify:)

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

<!-- ✓ GOOD -->
<my-component
  a-custom-prop="value"
  :another-custom-prop="1 + 1"
  :blue-color="false"
  boolean-prop-again
  z-prop="Z"
  @change="someMethod"
  @input="someOtherMethod"
>
  <!-- content -->
</my-component>

<!-- ✗ BAD -->
<my-component
  z-prop="Z"
  :another-custom-prop="1 + 1"
  :blue-color="false"
  boolean-prop-again
  a-custom-prop="value"
  @input="someOtherMethod"
  @change="someMethod"
>
  <!-- content -->
</my-component>

Additional context

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy