美文网首页
vue项目安装出现的问题No ESLint configurat

vue项目安装出现的问题No ESLint configurat

作者: 小伙有点菜 | 来源:发表于2021-03-29 17:57 被阅读0次

用低版本脚手架安装vue项目时若选上ESLint时若出现No ESLint configuration found这样的错,解决方法如下:

npm init -y

npm install eslint --save-dev

./node_modules/.bin/eslint --init

以上三步执行完后No ESLint configuration found的问题便解决了,但会有其他的错误,因此,如果项目中有.eslintrc.js文件则把里面的内容改为以下内容,若没有该文件建立后写入以下代码:

module.exports = {

  root: true,

  parserOptions: {

    parser: 'babel-eslint'

  },

  env: {

    browser: true,

  },

  extends: [

    error-prevention

    'plugin:vue/essential',

    'standard'

  ],

  plugins: [

    'vue'

  ],

  rules: {

    'generator-star-spacing': 'off',

    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'

  }

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

现在在运行项目就没有错啦!✌️✌️✌️✌️✌️✌️

————————————————

版权声明:本文为CSDN博主「smile@qingqing」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/weixin_43363871/article/details/94838553

相关文章

网友评论

      本文标题:vue项目安装出现的问题No ESLint configurat

      本文链接:https://www.haomeiwen.com/subject/zgsfhltx.html