Module Warning (from ./node_modules/eslint-loader/index.js):
error:Strings must use singlequote(quotes) at src/store.js:1:17:
> 1 | import Vue from "vue"
| ^
2 | import Vuex from 'vuex'
3 | Vue.use(Vuex)
4 | export default new Vuex.Store({
error:Expected indentation of 2 spaces but found 4(indent) at src/store.js:5:1:
3 | Vue.use(Vuex)
4 | export default new Vuex.Store({
> 5 | state: {
| ^
6 |
7 | },
8 | mutations: {
error:Expected indentation of 2 spaces but found 4(indent) at src/store.js:7:1:
5 | state: {
6 |
> 7 | },
| ^
8 | mutations: {
9 |
10 | },
error:Expected indentation of 2 spaces but found 4(indent) at src/store.js:8:1:
6 |
7 | },
> 8 | mutations: {
| ^
9 |
10 | },
11 | actions: {
Prettier配置
我这边是因为没有安装 Prettier,所以才报错的,安装 npm i prettier -g
{
"semi": false,
"singleQuote": true
}
使用快捷键:alt + shift + f 整理代码
网友评论