Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prefer-template in template #865

Closed
1 of 4 tasks
SimacIDS opened this issue Apr 2, 2019 · 1 comment
Closed
1 of 4 tasks

prefer-template in template #865

SimacIDS opened this issue Apr 2, 2019 · 1 comment

Comments

@SimacIDS
Copy link

SimacIDS commented Apr 2, 2019

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

@ota-meshi
Copy link
Member

I have implemented this rule. #1141
I plan to alpha release this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants