Skip to content

Fix: unintentional disabling #338

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

Merged
merged 1 commit into from
Jan 10, 2018
Merged

Conversation

mysticatea
Copy link
Member

I noticed that <!-- eslint-disable --> affects to the code in <script> element.
This PR fixes vue/comment-directive rule to clear state at the end of <template> element.

<template>
  <!-- eslint-disable -->
  <div id id="a">Hello</div>
</template>
<script>
  var a // `no-unused-vars` rule didn't trigger.
</script>

.... Or I wonder if people expect to share the state between <template> and <script>? I thought no.

<template>
  <!-- eslint-disable -->
  <div id id="a">Hello</div>
</template>
<script>
  /* eslint-enable */
  var a
</script>

@michalsnik michalsnik merged commit c4356d5 into master Jan 10, 2018
@michalsnik michalsnik deleted the comment-directive/fix-for-script branch January 10, 2018 22:04
@michalsnik
Copy link
Member

Great, thank you!

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

Successfully merging this pull request may close these issues.

2 participants