Skip to content

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

Open
@r0skar

Description

@r0skar

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions