eslint : TypeError: this.CliEngine is not a constructor
--原因分析
旧版版eslint-plugin 使用新版eslint导致
--找到webstorm的plugins目录,如:
WebStorm 2018.3.6/plugins/JavaScriptLanguage/languageService/eslint/bin/eslint-plugin.js
--修改内容
this.cliEngine = require(this.basicPath + "lib/cli-engine");
为:
const cliEngine = require(this.basicPath + "lib/cli-engine") if(cliEngine.CLIEngine) { this.cliEngine = cliEngine.CLIEngine } else { this.cliEngine = cliEngine }
即能够同时支持新版及旧版eslint配置
--重启webstorm