Skip to content

Unexpected end of expression on close of JS multi-line comment within template #398

Closed
@mhldtna

Description

@mhldtna

(Sigh, I noticed in the "Preview" view that the code that I copy/pasted into the code sections is all messed up. I have attached screen shots below so you can see what I have.)

Environment:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
node v6.11.3
VSCode version 1.20.0

.eslintrc.json:

{
    "root": true,
    "extends": [
         "airbnb-base",
         "plugin:vue/recommended"
    ],
    "rules": {
        "no-undef": 1,
        "no-unused-vars": 1,
        "vue/no-unused-vars": "error",
        "linebreak-style": ["error", "windows"],
        "eol-last": 0,
        "no-underscore-dangle": 0,
        "quotes": 0,
        "no-restricted-syntax": 0,
        "no-multi-spaces": 0,
        "no-trailing-spaces": 0,
        "no-plusplus": 0,
        "prefer-destructuring": 0,
        "padded-blocks": 0
    }
}

I have the following template in a .vue component. Notice the JS-style comment in the middle.

<template>
  <div>
    <b-table 
      small
      striped
      hover
      foot-clone
      :items="solutions" 
      :fields="columns"
      :filter="filter"
      @row-clicked="rowClicked">
      <template
        slot="top-row"
        slot-scope="{columns, fields}">
        {{ /* columns and fields are properties passed in from the table to the template.
            columns is the number of columns.
            fields is an array of column names
        */ }}
        <td
          v-for="(column) of fields"
          :key="column.key">
          <ColumnFilter :column="column" />
        </td>
      </template>
    </b-table>
  </div>
</template>

eslintrc
eslint parsing error
eslintrc
eslint parsing error

I am getting the following error from eslint, referencing the last line of the comment.

Parsing error: Unexpected end of expression. (vue/no-parsing-error) (25,12)

The squiqqly error indicator is under the first "}" character of the closing "}}".

I believe this is not an error.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions