Skip to content

Rule Proposal: vue/no-constant-condition #1358

Closed
@Zzzen

Description

@Zzzen

Please describe what the rule should do:
like no-constant-condition in eslint, but works with v-if/v-show.

What category should the rule belong to?

[ ] Enforces code style (layout)
[x] 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:

<div v-if="true"></div>
<div v-if="true || prop1"></div>

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