猿问

vue项目安装依赖包 eslint的问题

vue在安装依赖包是回提示一个警告

[3/4] Linking dependencies...

warning "eslint-config-airbnb-base@11.2.0" has incorrect peer dependency "eslint

@^3.19.0".

然后装好之后run代码就狂报错,这是其中一段错误信息

error in ./src/pages/retailer/components/HintMsg.vue


✘ http://eslint.org/docs/rules/... Expected linebreaks to be 'LF

' but found 'CRLF'

srcpagesretailercomponentsHintMsg.vue:11:9

<script>


       ^

✘ http://eslint.org/docs/rules/... Expected linebreaks to be 'LF

' but found 'CRLF'

srcpagesretailercomponentsHintMsg.vue:12:19


export default {

                 ^

✘ http://eslint.org/docs/rules/... Expected linebreaks to be 'LF

' but found 'CRLF'

srcpagesretailercomponentsHintMsg.vue:13:20


  props: ['msg'],

                  ^

全部是代码格式有问题,我把webpack.base.conf.js中的{


    test: /\.(js|vue)$/,

    loader: 'eslint-loader',

    enforce: 'pre',

    include: [resolve('src'), resolve('test')],

    options: {

      formatter: require('eslint-friendly-formatter')

    }

eslint注释点代码run起来了,一切正常

求助!!!!!!!!


青春有我
浏览 3461回答 1
1回答
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答