老师,有没有什么工具能自动调整格式,格式不规范浏览器报了好多错,看着好难受
来源:7-9 Vue项目首页 - 使用 axios 发送 ajax 请求
慕先生0278925
2020-12-11
✘ http://eslint.org/docs/rules/key-spacing Missing space before value for key 'swiperList’
src\pages\home\components\Swiper.vue:21:17
swiperList:[{
^
✘ http://eslint.org/docs/rules/no-mixed-spaces-and-tabs Mixed spaces and tabs
src\pages\home\components\Swiper.vue:22:2
id:“001”,
^
✘ http://eslint.org/docs/rules/no-tabs Unexpected tab character
src\pages\home\components\Swiper.vue:22:6
id:“001”,
^
✘ http://eslint.org/docs/rules/key-spacing Missing space before value for key 'id’
src\pages\home\components\Swiper.vue:22:10
id:“001”,
^
✘ http://eslint.org/docs/rules/quotes Strings must use singlequote
src\pages\home\components\Swiper.vue:22:10
id:“001”,
^
✘ http://eslint.org/docs/rules/no-mixed-spaces-and-tabs Mixed spaces and tabs
src\pages\home\components\Swiper.vue:23:2
url:“https://imgs.qunarzz.com/vs_ceph_vcimg/1cfbdaa2682ada2f854ea6114b3677c8.jpeg”
^
✘ http://eslint.org/docs/rules/no-tabs Unexpected tab character
src\pages\home\components\Swiper.vue:23:6
url:“https://imgs.qunarzz.com/vs_ceph_vcimg/1cfbdaa2682ada2f854ea6114b3677c8.jpeg”
1回答
-
到是真有这么一个插件eslint,你可以在你的编辑器添加一下这个插件,然后配置下试试。
022020-12-15
相似问题