From c353f81b9f43024c51ab87762987e8a2de607e63 Mon Sep 17 00:00:00 2001 From: wancat Date: Mon, 5 Feb 2024 11:57:53 +0800 Subject: [PATCH] fix vue eslint error --- .eslintrc.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 7b9e7e4..8a60988 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,17 +4,16 @@ module.exports = { node: true, jest: true, }, - plugins: ['@typescript-eslint', 'cypress'], + plugins: ['@typescript-eslint', 'cypress', 'vue'], extends: [ 'plugin:vue/vue3-essential', 'airbnb-base', 'plugin:prettier/recommended', // We added this 'plugin:cypress/recommended', ], - parser: '@typescript-eslint/parser', // Specify the TypeScript parser - + parser: 'vue-eslint-parser', parserOptions: { - ecmaVersion: 13, + parser: '@typescript-eslint/parser', sourceType: 'module', }, @@ -25,6 +24,9 @@ module.exports = { }, typescript: {}, }, + vue: { + version: '3.0', // Explicitly specify Vue 3 + }, }, rules: { 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',