Skip to content

Rule Proposal: Boolean prop shorthand (prop instead of :prop="true") #775

Closed
@TheAlexLichter

Description

@TheAlexLichter

Please describe what the rule should do:

I've seen code like <div :boolProp="true" /> often where you could use <div boolProp /> instead. I'd love to see a rule for that (plus an auto-fix option which should be fairly possible)

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:

<template>
  <div>
    <button :disabled="true">
  </div>
</template>

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