在使用vue的时候,各种报错,找了很久,改了多遍,也解决不了问题。
如下:

src\views\edu\teacher\list.vue:16:17
total: 0, //总记录数
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\views\edu\teacher\list.vue:17:23
teacherQuery: {}, //条件封装对象
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:17:25
teacherQuery: {}, //条件封装对象
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:18:6
};
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:21:5
//页面渲染之前执行,一般调用methods定义的方法
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:24:5
//创建具体的方法,调用teacher.js定义的方法
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:25:5
//讲师列表的方法
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:29:17
.then() //请求成功
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:30:17
.catch(); //请求失败
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:30:19
.catch(); //请求失败
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\views\edu\teacher\list.vue:31:6
},
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\views\edu\teacher\list.vue:32:4
},
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:33:2
};
^
✘ 19 problems (19 errors, 0 warnings)
Errors:
11 http://eslint.org/docs/rules/spaced-comment
4 http://eslint.org/docs/rules/semi
3 http://eslint.org/docs/rules/comma-dangle
1 http://eslint.org/docs/rules/quotes
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.
WAIT Compiling... 下午6:03:34
98% after emitting
WARNING Compiled with 2 warnings 下午6:03:34
Module Warning (from ./node_modules/eslint-loader/index.js):
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\api\edu\teacher.js:4:1
// 1 讲师列表(条件查询分页)
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\api\edu\teacher.js:5:1
// current当前页 limit每页记录数 teacherQuery条件对象
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\api\edu\teacher.js:6:1
getTeacherListPage(current, limit, teacherQuery) {
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 4 spaces but found 8
src\api\edu\teacher.js:7:1
return request({
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:8:1
//url: '/eduservice/teacher/pageTeacherCondition/'+current+"/"+limit,
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\api\edu\teacher.js:8:13
//url: '/eduservice/teacher/pageTeacherCondition/'+current+"/"+limit,
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:9:1
url: '/eduservice/teacher/pageTeacherCondition/${current}/${limit}',
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:10:1
method: 'post',
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:11:1
//teacherQuery条件对象,后端使用teacherQuery获取数据
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\api\edu\teacher.js:11:13
//teacherQuery条件对象,后端使用teacherQuery获取数据
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:12:1
//data表示把对象转换json进行传递到接口里面
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\api\edu\teacher.js:12:13
//data表示把对象转换json进行传递到接口里面
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:13:1
data() {
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 8 spaces but found 16
src\api\edu\teacher.js:14:1
return {
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 10 spaces but found 20
src\api\edu\teacher.js:15:1
teacherQuery
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 8 spaces but found 16
src\api\edu\teacher.js:16:1
}
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:17:1
},
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\api\edu\teacher.js:17:14
},
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 4 spaces but found 8
src\api\edu\teacher.js:18:1
})
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\api\edu\teacher.js:19:1
}
^
✘ 20 problems (20 errors, 0 warnings)
Errors:
16 http://eslint.org/docs/rules/indent
3 http://eslint.org/docs/rules/spaced-comment
1 http://eslint.org/docs/rules/comma-dangle
Module Warning (from ./node_modules/eslint-loader/index.js):
✘ http://eslint.org/docs/rules/quotes Strings must use singlequote
src\views\edu\teacher\list.vue:7:21
import teacher from "@/api/edu/teacher";
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:7:40
import teacher from "@/api/edu/teacher";
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:11:5
//定义变量和初始值
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:13:19
list: null, //查询之后接口返回集合
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:14:16
page: 1, //当前页
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:15:18
limit: 10, //每页记录数
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:16:17
total: 0, //总记录数
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\views\edu\teacher\list.vue:17:23
teacherQuery: {}, //条件封装对象
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:17:25
teacherQuery: {}, //条件封装对象
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:18:6
};
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:21:5
//页面渲染之前执行,一般调用methods定义的方法
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:24:5
//创建具体的方法,调用teacher.js定义的方法
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:25:5
//讲师列表的方法
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:29:17
.then() //请求成功
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:30:17
.catch(); //请求失败
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:30:19
.catch(); //请求失败
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\views\edu\teacher\list.vue:31:6
},
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\views\edu\teacher\list.vue:32:4
},
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:33:2
};
^
✘ 19 problems (19 errors, 0 warnings)
Errors:
11 http://eslint.org/docs/rules/spaced-comment
4 http://eslint.org/docs/rules/semi
3 http://eslint.org/docs/rules/comma-dangle
1 http://eslint.org/docs/rules/quotes
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.
WAIT Compiling... 下午6:03:48
98% after emitting
WARNING Compiled with 2 warnings 下午6:03:49
Module Warning (from ./node_modules/eslint-loader/index.js):
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\api\edu\teacher.js:4:1
// 1 讲师列表(条件查询分页)
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\api\edu\teacher.js:5:1
// current当前页 limit每页记录数 teacherQuery条件对象
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\api\edu\teacher.js:6:1
getTeacherListPage(current, limit, teacherQuery) {
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 4 spaces but found 8
src\api\edu\teacher.js:7:1
return request({
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:8:1
//url: '/eduservice/teacher/pageTeacherCondition/'+current+"/"+limit,
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\api\edu\teacher.js:8:13
//url: '/eduservice/teacher/pageTeacherCondition/'+current+"/"+limit,
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:9:1
url: '/eduservice/teacher/pageTeacherCondition/${current}/${limit}',
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:10:1
method: 'post',
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:11:1
//teacherQuery条件对象,后端使用teacherQuery获取数据
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\api\edu\teacher.js:11:13
//teacherQuery条件对象,后端使用teacherQuery获取数据
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:12:1
//data表示把对象转换json进行传递到接口里面
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\api\edu\teacher.js:12:13
//data表示把对象转换json进行传递到接口里面
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:13:1
data() {
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 8 spaces but found 16
src\api\edu\teacher.js:14:1
return {
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 10 spaces but found 20
src\api\edu\teacher.js:15:1
teacherQuery
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 8 spaces but found 16
src\api\edu\teacher.js:16:1
}
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:17:1
},
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\api\edu\teacher.js:17:14
},
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 4 spaces but found 8
src\api\edu\teacher.js:18:1
})
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\api\edu\teacher.js:19:1
}
^
✘ 20 problems (20 errors, 0 warnings)
Errors:
16 http://eslint.org/docs/rules/indent
3 http://eslint.org/docs/rules/spaced-comment
1 http://eslint.org/docs/rules/comma-dangle
Module Warning (from ./node_modules/eslint-loader/index.js):
✘ http://eslint.org/docs/rules/quotes Strings must use singlequote
src\views\edu\teacher\list.vue:7:21
import teacher from "@/api/edu/teacher";
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:7:40
import teacher from "@/api/edu/teacher";
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:11:5
//定义变量和初始值
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:13:19
list: null, //查询之后接口返回集合
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:14:16
page: 1, //当前页
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:15:18
limit: 10, //每页记录数
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:16:17
total: 0, //总记录数
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\views\edu\teacher\list.vue:17:23
teacherQuery: {}, //条件封装对象
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:17:25
teacherQuery: {}, //条件封装对象
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:18:6
};
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:21:5
//页面渲染之前执行,一般调用methods定义的方法
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:24:5
//创建具体的方法,调用teacher.js定义的方法
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:25:5
//讲师列表的方法
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:29:17
.then() //请求成功
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:30:17
.catch(); //请求失败
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:30:19
.catch(); //请求失败
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\views\edu\teacher\list.vue:31:6
},
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\views\edu\teacher\list.vue:32:4
},
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:33:2
};
^
✘ 19 problems (19 errors, 0 warnings)
Errors:
11 http://eslint.org/docs/rules/spaced-comment
4 http://eslint.org/docs/rules/semi
3 http://eslint.org/docs/rules/comma-dangle
1 http://eslint.org/docs/rules/quotes
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.
WAIT Compiling... 下午6:07:40
98% after emitting
WARNING Compiled with 2 warnings 下午6:07:41
Module Warning (from ./node_modules/eslint-loader/index.js):
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\api\edu\teacher.js:4:1
// 1 讲师列表(条件查询分页)
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\api\edu\teacher.js:5:1
// current当前页 limit每页记录数 teacherQuery条件对象
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\api\edu\teacher.js:6:1
getTeacherListPage(current, limit, teacherQuery) {
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 4 spaces but found 8
src\api\edu\teacher.js:7:1
return request({
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:8:1
//url: '/eduservice/teacher/pageTeacherCondition/'+current+"/"+limit,
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\api\edu\teacher.js:8:13
//url: '/eduservice/teacher/pageTeacherCondition/'+current+"/"+limit,
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:9:1
url: '/eduservice/teacher/pageTeacherCondition/${current}/${limit}',
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:10:1
method: 'post',
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:11:1
//teacherQuery条件对象,后端使用teacherQuery获取数据
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\api\edu\teacher.js:11:13
//teacherQuery条件对象,后端使用teacherQuery获取数据
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:12:1
//data表示把对象转换json进行传递到接口里面
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\api\edu\teacher.js:12:13
//data表示把对象转换json进行传递到接口里面
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:13:1
data() {
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 8 spaces but found 16
src\api\edu\teacher.js:14:1
return {
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 10 spaces but found 20
src\api\edu\teacher.js:15:1
teacherQuery
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 8 spaces but found 16
src\api\edu\teacher.js:16:1
}
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:17:1
},
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\api\edu\teacher.js:17:14
},
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 4 spaces but found 8
src\api\edu\teacher.js:18:1
})
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\api\edu\teacher.js:19:1
}
^
✘ 20 problems (20 errors, 0 warnings)
Errors:
16 http://eslint.org/docs/rules/indent
3 http://eslint.org/docs/rules/spaced-comment
1 http://eslint.org/docs/rules/comma-dangle
Module Warning (from ./node_modules/eslint-loader/index.js):
✘ http://eslint.org/docs/rules/quotes Strings must use singlequote
src\views\edu\teacher\list.vue:7:21
import teacher from "@/api/edu/teacher";
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:7:40
import teacher from "@/api/edu/teacher";
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:11:5
//定义变量和初始值
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:13:19
list: null, //查询之后接口返回集合
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:14:16
page: 1, //当前页
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:15:18
limit: 10, //每页记录数
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:16:17
total: 0, //总记录数
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\views\edu\teacher\list.vue:17:23
teacherQuery: {}, //条件封装对象
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:17:25
teacherQuery: {}, //条件封装对象
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:18:6
};
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:21:5
//页面渲染之前执行,一般调用methods定义的方法
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:24:5
//创建具体的方法,调用teacher.js定义的方法
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:25:5
//讲师列表的方法
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:29:17
.then() //请求成功
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:30:17
.catch(); //请求失败
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:30:19
.catch(); //请求失败
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\views\edu\teacher\list.vue:31:6
},
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\views\edu\teacher\list.vue:32:4
},
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:33:2
};
^
✘ 19 problems (19 errors, 0 warnings)
Errors:
11 http://eslint.org/docs/rules/spaced-comment
4 http://eslint.org/docs/rules/semi
3 http://eslint.org/docs/rules/comma-dangle
1 http://eslint.org/docs/rules/quotes
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.
WAIT Compiling... 下午6:07:46
98% after emitting
WARNING Compiled with 2 warnings 下午6:07:46
Module Warning (from ./node_modules/eslint-loader/index.js):
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\api\edu\teacher.js:4:1
// 1 讲师列表(条件查询分页)
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\api\edu\teacher.js:5:1
// current当前页 limit每页记录数 teacherQuery条件对象
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\api\edu\teacher.js:6:1
getTeacherListPage(current, limit, teacherQuery) {
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 4 spaces but found 8
src\api\edu\teacher.js:7:1
return request({
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:8:1
//url: '/eduservice/teacher/pageTeacherCondition/'+current+"/"+limit,
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\api\edu\teacher.js:8:13
//url: '/eduservice/teacher/pageTeacherCondition/'+current+"/"+limit,
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:9:1
url: '/eduservice/teacher/pageTeacherCondition/${current}/${limit}',
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:10:1
method: 'post',
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:11:1
//teacherQuery条件对象,后端使用teacherQuery获取数据
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\api\edu\teacher.js:11:13
//teacherQuery条件对象,后端使用teacherQuery获取数据
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:12:1
//data表示把对象转换json进行传递到接口里面
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\api\edu\teacher.js:12:13
//data表示把对象转换json进行传递到接口里面
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:13:1
data() {
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 8 spaces but found 16
src\api\edu\teacher.js:14:1
return {
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 10 spaces but found 20
src\api\edu\teacher.js:15:1
teacherQuery
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 8 spaces but found 16
src\api\edu\teacher.js:16:1
}
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 6 spaces but found 12
src\api\edu\teacher.js:17:1
},
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\api\edu\teacher.js:17:14
},
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 4 spaces but found 8
src\api\edu\teacher.js:18:1
})
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\api\edu\teacher.js:19:1
}
^
✘ 20 problems (20 errors, 0 warnings)
Errors:
16 http://eslint.org/docs/rules/indent
3 http://eslint.org/docs/rules/spaced-comment
1 http://eslint.org/docs/rules/comma-dangle
Module Warning (from ./node_modules/eslint-loader/index.js):
✘ http://eslint.org/docs/rules/quotes Strings must use singlequote
src\views\edu\teacher\list.vue:7:21
import teacher from "@/api/edu/teacher";
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:7:40
import teacher from "@/api/edu/teacher";
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:11:5
//定义变量和初始值
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:13:19
list: null, //查询之后接口返回集合
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:14:16
page: 1, //当前页
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:15:18
limit: 10, //每页记录数
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:16:17
total: 0, //总记录数
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\views\edu\teacher\list.vue:17:23
teacherQuery: {}, //条件封装对象
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:17:25
teacherQuery: {}, //条件封装对象
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:18:6
};
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:21:5
//页面渲染之前执行,一般调用methods定义的方法
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:24:5
//创建具体的方法,调用teacher.js定义的方法
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:25:5
//讲师列表的方法
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:29:17
.then() //请求成功
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:30:17
.catch(); //请求失败
^
✘ http://eslint.org/docs/rules/spaced-comment Expected space or tab after '//' in comment
src\views\edu\teacher\list.vue:30:19
.catch(); //请求失败
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\views\edu\teacher\list.vue:31:6
},
^
✘ http://eslint.org/docs/rules/comma-dangle Unexpected trailing comma
src\views\edu\teacher\list.vue:32:4
},
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\views\edu\teacher\list.vue:33:2
};
^
✘ 19 problems (19 errors, 0 warnings)
Errors:
11 http://eslint.org/docs/rules/spaced-comment
4 http://eslint.org/docs/rules/semi
3 http://eslint.org/docs/rules/comma-dangle
1 http://eslint.org/docs/rules/quotes
原来eslint是一个语法检查工具,但是限制很严格,在我的vue文件里面很多空格都会导致红线(红线可以关闭提示),虽然可以关闭,但是在编译的时候老是会跳出来,所以能关闭是最好的了。
关闭方法:在build/webpack.base.conf.js文件中,注释或者删除掉:module->rules中有关eslint的规则:
然后再重新运行一下npm run dev或者构建命令 npm run build就可以啦。