<>Vue 项目启动抛出 Module build failed/ Error/ No ESLint configuration found.

项目启动时控制台抛出 Module build failed: Error: No ESLint configuration found. 的错误

<>更多精彩

* 更多技术博客,请移步 asing1elife’s blog <http://asing1elife.com>
<>出现错误的原因

* 因为项目根路径缺少 ESLint 的配置文件
<>解决问题的方式

* 将 ESLint 相关配置文件添加至项目根路径 // https://eslint.org/docs/user-guide/configuring
module.exports = { root: true, parser: 'babel-eslint', parserOptions: {
sourceType: 'module' }, env: { browser: true, }, //
https://github.com/standard/standard/blob/master/docs/RULES-en.md extends:
'standard', // required to lint *.vue files plugins: [ 'html' ], // add your
custom rules here 'rules': { // allow paren-less arrow functions 'arrow-parens':
0, // allow async-await 'generator-star-spacing': 0, // allow debugger during
development 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, //
忽略函数空格检测 'space-before-function-paren': 0, // 中缀操作符周围要不要有空格 'space-infix-ops': 0
, 'no-trailing-spaces': 0, 'new-parens': 0 } } /build/ /config/ /dist/ /*.js