From a1d1d738defcb7bca3b432f23c5668c398c5a906 Mon Sep 17 00:00:00 2001 From: JiwenBai Date: Tue, 17 Dec 2019 17:26:25 +0800 Subject: [PATCH] fixed(eslint): use bable-eslint to support async import --- .eslintrc.js | 3 +++ demo/init.js | 4 ++-- package.json | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index dc55acfa9..c789d71f5 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,5 +1,8 @@ module.exports = { extends: ['plugin:vue/recommended', '@vue/standard'], + parserOptions: { + parser: "babel-eslint" + }, rules: { 'vue/max-attributes-per-line': [ 2, diff --git a/demo/init.js b/demo/init.js index d6772ed05..05987df72 100644 --- a/demo/init.js +++ b/demo/init.js @@ -240,7 +240,7 @@ const router = new VueRouter({ routes }) -router.beforeEach(function(to, from, next) { +router.beforeEach(function (to, from, next) { Vue.prototype.$NLoadingBar.theme = to.params.theme if (to.path !== from.path) { Vue.prototype.$NLoadingBar.start() @@ -248,7 +248,7 @@ router.beforeEach(function(to, from, next) { next() }) -router.afterEach(function(to, from) { +router.afterEach(function (to, from) { if (to.path !== from.path) { Vue.prototype.$NLoadingBar.finish() } diff --git a/package.json b/package.json index 12f019d33..9076d1b90 100644 --- a/package.json +++ b/package.json @@ -45,8 +45,9 @@ "css-loader": "^2.1.1", "emoji-regex": "^8.0.0", "emoji-unicode": "^1.0.10", - "eslint": "^5.16.0", - "eslint-plugin-vue": "^5.2.2", + "eslint": "^6.6.0", + "babel-eslint": "^10.0.3", + "eslint-plugin-vue": "^5.0.0", "extract-text-webpack-plugin": "^4.0.0-beta.0", "file-loader": "^3.0.1", "glob": "^7.1.5",