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

Implement autofix for this-in-template #1492

Closed
NeonWizard opened this issue May 13, 2021 · 0 comments · Fixed by #1493
Closed

Implement autofix for this-in-template #1492

NeonWizard opened this issue May 13, 2021 · 0 comments · Fixed by #1493

Comments

@NeonWizard
Copy link

What rule do you want to change?
eslint-plugin-vue/this-in-template

Does this change cause the rule to produce more or fewer warnings?
No.

How will the change be implemented? (New option, new default behavior, etc.)?
Adds the ability to try to automatically remove this from variables in the template.

Please provide some example code that this change will affect:

<template>
  <!-- ✓ AFTER -->
  <a :href="url">
    {{ text }}
  </a>
  
  <!-- ✗ BEFORE -->
  <a :href="this.url">
    {{ this.text }}
  </a>
</template>

What does the rule currently do for this code?
Just warns.

What will the rule do after it's changed?
Warns and attempts to fix if specified by removing this. prefix.

IWANABETHATGUY added a commit to IWANABETHATGUY/eslint-plugin-vue that referenced this issue May 16, 2021
ota-meshi pushed a commit that referenced this issue May 29, 2021
* feat: 🎸 #1492

* docs: ✏️ update doc

* fix: 🐛 fix eslint
lisadeloach63 added a commit to lisadeloach63/plugin-develop-vue that referenced this issue Oct 7, 2022
* feat: 🎸 vuejs/eslint-plugin-vue#1492

* docs: ✏️ update doc

* fix: 🐛 fix eslint
Viktor949 added a commit to Viktor949/Eslint-Plugin-Vue that referenced this issue Oct 1, 2023
* feat: 🎸 vuejs/eslint-plugin-vue#1492

* docs: ✏️ update doc

* fix: 🐛 fix eslint
sebastianmensense added a commit to sebastianmensense/Eslint-Plugin-Vue- that referenced this issue Nov 15, 2023
* feat: 🎸 vuejs/eslint-plugin-vue#1492

* docs: ✏️ update doc

* fix: 🐛 fix eslint
Antontokarchuk0302 added a commit to Antontokarchuk0302/Eslint-plugin that referenced this issue Nov 16, 2023
* feat: 🎸 vuejs/eslint-plugin-vue#1492

* docs: ✏️ update doc

* fix: 🐛 fix eslint
myrhalsbw added a commit to myrhalsbw/eslint-plugin-vue that referenced this issue Sep 16, 2024
* feat: 🎸 vuejs/eslint-plugin-vue#1492

* docs: ✏️ update doc

* fix: 🐛 fix eslint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants