eslint的error:Strings must use singlequote等

eslint的error:Strings must use singlequote等vue

WARNING  Compiled with 1 warnings                                                                                                    4:00:42 PM
  ✘  http://eslint.org/docs/rules/spaced-comment  Expected space or tab after '//' in comment  
  src/router/index.js:6:1
  //const subscribeList = r => require.ensure([], () => r(require('../components/subscribeList')), 'subscribeList');
   ^
✘ 1 problem (1 error, 0 warnings)
Errors:
  1  http://eslint.org/docs/rules/spaced-comment
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.

解決: // constexpress

✘  http://eslint.org/docs/rules/no-multiple-empty-lines  More than 1 blank line not allowed              
  src/components/subscribeList.vue:6:1
<script>


</script>

解決:ui

<script>

</script>
✘  https://google.com/#q=vue%2Fvalid-template-root  The template root requires exactly one element  
  src/components/subscribeList.vue:1:1
  <template>
   ^

解決:google

<template>
  <div class="main-wrap">
  </div>
</template>
✘  http://eslint.org/docs/rules/comma-style  Bad line breaking before and after ','  
  src/router/index.js:19:5
      ,
       ^

解決: },spa

✘  http://eslint.org/docs/rules/semi                 Extra semicolon                                                
  src/main.js:17:32
    let login = getStore('login');

解決: let login = getStore('login')eslint

✘  http://eslint.org/docs/rules/no-unneeded-ternary  Unnecessary use of boolean literals in conditional expression  
  src/main.js:18:43
    store.state.login = login === 'false' ? false : true
                                             ^

解決: store.state.login = login !== "false"code

✘  http://eslint.org/docs/rules/quotes  Strings must use singlequote  
  src/main.js:18:33
    store.state.login = login !== "false"

解決:component

store.state.login = login !== 'false'
或者
/* eslint-disable */
或者
.eslintrc.js的rules裏:
"quotes": [1, "single"], //引號類型 `` "" ''
error變成waring而已:
✘ 1 problem (0 errors, 1 warning)
相關文章
相關標籤/搜索