Skip to content

prefer-template in template #865

Closed
Closed
@SimacIDS

Description

@SimacIDS

Please describe what the rule should do:

The rule should have the template comply to the following rule: https://eslint.org/docs/rules/prefer-template
Currently when using this rule template-strings are not enforced inside the template

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 class="options">
        <button v-for="option in options" 
                      :class="'btn btn-' + option.style"
        >
            {{ option.text }}
        </button>
    </div>
</template>

<template>
    <h3 :style="'color:' + preferredTitleColor + '; font-size:' + preferredFontSize + ';'">
        Welcome
    <h3/>
</template>

Additional context

Nope

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