Closed
Description
What code were you trying to parse?
Any Vue SFC.
e.g.
<template>
<q-page :class="$screenStyles.pageClasses + ' column'" padding>
<div class="flex items-stretch full-width" style="flex: 1 0 auto;">
<div :class="['flex justify-center full-width', verticalCenter ? 'items-center': null]">
<slot name="container-wrapper">
<div class="container">
<slot />
</div>
</slot>
</div>
</div>
</q-page>
</template>
<script lang="ts">
import { Component, Prop, Vue, Watch } from "vue-property-decorator"
@Component
export default class AppPage extends Vue {
@Prop({ default: false, type: Boolean })
public verticalCenter!: boolean
}
</script>
What did you expect to happen?
Eslint to return lint warnings/errors including for .vue files.
What actually happened?
D:\WebClient\ClientApp\src\components\AppPage.vue
16:14 error Parsing error: '>' expected
for each .vue file with no other errors/warnings. .ts files are correctly handled.
This is only happening on Windows, same setup with same project on macOS returns expected results.
Not sure if it's possible that the recent improvements for vue SFCs in #1083 have a platform-specific issue?
Please let me know if there's anything else I can provide that would be helpful.
Versions
package | version |
---|---|
@typescript-eslint/parser |
2.5.0 |
TypeScript |
3.6.4 |
ESLint |
6.5.1 |
node |
10.15.3 |
npm |
6.9.0 (yarn 1.19.1) |
.eslintrc.js
module.exports = {
root: true,
parserOptions: {
parser: "@typescript-eslint/parser",
sourceType: "module",
// ecmaFeatures: {
// legacyDecorators: true
// }
project: "./tsconfig.json",
extraFileExtensions: [
".vue"
],
},
env: {
node: true
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"plugin:vue/essential"
],
// required to lint *.vue files
plugins: [
"@typescript-eslint",
"import",
"vue",
],
globals: {
"ga": true, // Google Analytics
"cordova": true,
"__statics": true,
"process": true
},
// add your custom rules here
rules: {
// allow async-await
"generator-star-spacing": "off",
// allow paren-less arrow functions
"arrow-parens": "off",
"comma-dangle": ["error", "always-multiline"],
"one-var": "off",
"import/first": "off",
"import/named": "error",
"import/namespace": "error",
"import/default": "error",
"import/export": "error",
"import/extensions": "off",
"import/no-unresolved": "off",
"import/no-extraneous-dependencies": "off",
"max-len": ["warn", { "code": 120 }],
"no-trailing-spaces": "error",
"indent": "off",
// allow console.log during development only
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
// allow debugger during development only
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
"no-unused-vars": "off",
"prefer-promise-reject-errors": "off",
"quotes": "error",
"semi": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/indent": ["error", 2],
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/member-delimiter-style": ["warn", {
"multiline": {
"delimiter": "none"
}
}],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": ["warn", {
"vars": "all",
"args": "none",
"ignoreRestSiblings": false,
}],
"@typescript-eslint/semi": ["error", "never"],
}
}