From b91e9ddb7af81a03de78c9714e1383f969fd98a3 Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Thu, 29 Jul 2021 19:23:10 +0800 Subject: [PATCH] Fix: Add babel-eslint --- .eslintrc.js | 5 ++--- package-lock.json | 22 ++++++++++++++++++++++ package.json | 1 + 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 8ef64ed1a..9c8779a98 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,16 +2,15 @@ module.exports = { env: { browser: true, commonjs: true, - es2017: true, - es11: true, + es2020: true, node: true, }, extends: [ "eslint:recommended", "plugin:vue/vue3-recommended", ], + parser: "babel-eslint", parserOptions: { - ecmaVersion: 2020, sourceType: "module", }, rules: { diff --git a/package-lock.json b/package-lock.json index 810fe3059..01e0e1385 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1241,6 +1241,28 @@ "follow-redirects": "^1.10.0" } }, + "babel-eslint": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", + "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0", + "eslint-visitor-keys": "^1.0.0", + "resolve": "^1.12.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, "babel-plugin-add-module-exports": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-0.2.1.tgz", diff --git a/package.json b/package.json index 4d6a0fb6e..000e5c94a 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "@vitejs/plugin-legacy": "^1.5.0", "@vitejs/plugin-vue": "^1.3.0", "@vue/compiler-sfc": "^3.1.5", + "babel-eslint": "^10.1.0", "core-js": "^3.15.2", "eslint": "^7.31.0", "eslint-plugin-vue": "^7.14.0",