Fix: Add babel-eslint

This commit is contained in:
Nelson Chan 2021-07-29 19:23:10 +08:00
parent be22fcb87d
commit b91e9ddb7a
3 changed files with 25 additions and 3 deletions

View file

@ -2,16 +2,15 @@ module.exports = {
env: { env: {
browser: true, browser: true,
commonjs: true, commonjs: true,
es2017: true, es2020: true,
es11: true,
node: true, node: true,
}, },
extends: [ extends: [
"eslint:recommended", "eslint:recommended",
"plugin:vue/vue3-recommended", "plugin:vue/vue3-recommended",
], ],
parser: "babel-eslint",
parserOptions: { parserOptions: {
ecmaVersion: 2020,
sourceType: "module", sourceType: "module",
}, },
rules: { rules: {

22
package-lock.json generated
View file

@ -1241,6 +1241,28 @@
"follow-redirects": "^1.10.0" "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": { "babel-plugin-add-module-exports": {
"version": "0.2.1", "version": "0.2.1",
"resolved": "https://registry.npmjs.org/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-0.2.1.tgz", "resolved": "https://registry.npmjs.org/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-0.2.1.tgz",

View file

@ -60,6 +60,7 @@
"@vitejs/plugin-legacy": "^1.5.0", "@vitejs/plugin-legacy": "^1.5.0",
"@vitejs/plugin-vue": "^1.3.0", "@vitejs/plugin-vue": "^1.3.0",
"@vue/compiler-sfc": "^3.1.5", "@vue/compiler-sfc": "^3.1.5",
"babel-eslint": "^10.1.0",
"core-js": "^3.15.2", "core-js": "^3.15.2",
"eslint": "^7.31.0", "eslint": "^7.31.0",
"eslint-plugin-vue": "^7.14.0", "eslint-plugin-vue": "^7.14.0",