Skip to content

Rule Proposal: Analog for strict-boolean-expressions typescript-eslint rule #2143

@basil-gor

Description

@basil-gor

Please describe what the rule should do:

There are very useful rule strict-boolean-expressions in typescript-eslint.
If there are no possible ways to use it in vue templates, maybe we can implement a vue analog for this rule?

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:

Just for example for string expression:

// Will be incorrect ❌
<div
  v-if="someEmptyString"
/>

// Will be correct ✅
<div
   v-if="someEmptyString !== ''"
/>

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