javascript - Vue-cli error: Newline required at end of file but not found
本文介绍了javascript - Vue-cli error: Newline required at end of file but not found的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
eslint检查要留个空行,我在eslint中设置了eol=last:0,报错。
<temaplte>
<div class="header">
我是header
</div>
</temaplte>
<script type="text/ecmascript-6">
export default {};
//这里是空行
</script>
<style lang="stylus" rel="stylesheet/stylus">
</style>
代码留了个空行也报错,怎么解决这个问题?
解决方案
<template>
<div class="header">
我是header
</div>
</temaplte>
<script type="text/ecmascript-6">
export default {};
//这里是空行(下面空一行)
</script>
<style lang="stylus" rel="stylesheet/stylus">
</style>假如代码到此结束,那么必须在下面加一行空行
//这是空行
这篇关于javascript - Vue-cli error: Newline required at end of file but not found的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文