vite学习笔记二:vite配置eslint
·
安装依赖
yarn add eslint --dev
初始化eslint
npm init @eslint/config
选择风格
> To check syntax and find problems 检查语法并发现问题
To check syntax, find problems, and enforce code style 检查语法、发现问题并强制执行代码样式
> JavaScript modules (import/export)
CommonJS (require/exports)
None of these
接下来都是一些选择
查看效果
声明了一个常量100未使用,会有警告提示
import { createApp } from 'vue'
import App from './App.vue'
const a = 100;
createApp(App).mount('#app')
异常提示
const a: 100
已声明“a”,但从未读取其值。ts(6133)
'a' is assigned a value but never used.eslintno-unused-vars
博主开发了一个浏览器aweb123.com
更多推荐
所有评论(0)