0๐
โ
I think Iโm too tired or too old, anyway, the problem was in having two parserOptions
sections in the same lint file. Here is the final working version:
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
},
extends: [
"eslint:recommended",
"plugin:vue/vue3-essential",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
],
parser: "vue-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
project: ["./tsconfig.json"],
ecmaVersion: "latest",
sourceType: "module",
extraFileExtensions: [".vue"],
},
// parserOptions: {
// ecmaVersion: "latest",
// sourceType: "module",
// },
plugins: ["vue", "@typescript-eslint"],
};
0๐
As I see it you have two options :
-
change
parser: "vue-eslint-parser"
to@typescript-eslint/parser
-
add an override for .ts files and there set the parser to
@typescript-eslint/parser
Source:stackexchange.com