The Wayback Machine - https://web.archive.org/web/20220319173928/https://github.com/vuejs/eslint-plugin-vue/issues/1492
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

@NeonWizard NeonWizard commented May 13, 2021

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.

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

Successfully merging a pull request may close this issue.

2 participants