解决:
应该是升级不完全造成的,还需要升级依赖插件npm i eslint-plugin-import@latest
见源码
分析:
"eslint": "^4.1.1",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^2.0.7",
"eslint-loader": "^1.6.1",
"eslint-plugin-html": "^2.0.3",
"eslint-plugin-import": "^2.6.1", // 对应插件
"eslint-plugin-node": "^4.2.2",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1",
eslint-plugin-import
依赖 eslint-import-resolver-node
升级到了0.3.1
所以手动升级它:
`npm i eslint-plugin-import@latest`
用的atom,开发使用ES6语法
ESLint 升级eslint@3.19.0
后报错:unable to load resolver "node". (import/no-duplicates)
index.js
import Vue from 'vue'
import Router from 'vue-router'
main.js
import Vue from 'vue'
import { sync } from 'vuex-router-sync'
import ElementUI from 'element-ui'
第一行import
报错:unable to load resolver "node". (import/no-duplicates)
解决:
应该是升级不完全造成的,还需要升级依赖插件
npm i eslint-plugin-import@latest
见源码
突然自己好了