Skip to content

Rule "variable-name" is ignored in .vue files #16

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

Open
r0skar opened this issue May 27, 2018 · 0 comments
Open

Rule "variable-name" is ignored in .vue files #16

r0skar opened this issue May 27, 2018 · 0 comments

Comments

@r0skar
Copy link

r0skar commented May 27, 2018

I have this option in the tslint.json file:

"variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore"],

I have this vue file:

<script lang="ts">
export default {
  methods: {
    sayHello(string: string) {
      return string
    }
  }
}
</script>

and this typescript file:

sayHello(string: string) {
  return string
}

VSCode shows no warning in the Vue file, however it shows the correct warning in the typescript file ([ts] 'string' only refers to a type, but is being used as a value here.).

How can I have the same behavior in the Vue file?

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

No branches or pull requests

1 participant