Skip to content

Incorrect TypeScript comment style on Vue files #266

@j-a-m-l

Description

@j-a-m-l

This is an example of how these lines are commented when the language is TypeScript:

<template lang="pug">
</template>

<script lang="ts">
import { dispatch, get } from 'vuex-pathify'
import Vue from '../config'

// const value: string = 'asa' 

// const works = {
//   only: 'value',
}

const works = {
  <!-- value -->
}

function() {
  <!-- callIt() -->
}

export default Vue.component('User', {
  // // From this line (`gc4j`)
  // otherOptions: {
  //   example: true,
  //   other: false
  // },
  computed: {
    <!-- user: get('users/current'), -->
    <!-- other: get('users/other'), -->
  },
  data: () => ({
    <!-- isFetchingUsers: false, -->
  }),
  methods: {
    async fetchUsers () {
      // This works
      // await dispatch('users/fetchAll')
    },
  },
})
</script>

I've discovered that this occur inside braces, but not in every case: if the command is triggered from a line that contains the brace, it may work correctly.

When setting the language to JavaScript, the comments are done correctly.

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