随笔分类 -  eslint

摘要:setup报错: 解决办法: 阅读全文
posted @ 2022-02-11 11:07 鼓舞飞扬 阅读(1147) 评论(0) 推荐(0) 编辑
摘要:最佳实践: 现在VScode,Notepad++编辑器都能够自动识别文件的换行符是LF还是CRLF。 如果你用的是windows,文件编码是UTF-8且包含中文,最好全局将autocrlf设置为false。 git config --global core.autocrlf false 注意:git 阅读全文
posted @ 2021-07-08 09:12 鼓舞飞扬 阅读(1939) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/weixin_45077178/article/details/107226551 视频教程: https://xdclass.net/#/dplayer?video_id=42&e_id=11702 prettier帮助我们,按照eslint规则,格式化 阅读全文
posted @ 2021-07-05 14:39 鼓舞飞扬 阅读(184) 评论(0) 推荐(0) 编辑
摘要:使用剩余参数代替 arguments (prefer-rest-params) 剩余参数来自于ES2016。可以在可变函数中使用这个特性来替代arguments变量。arguments没有Array.prototype方法,所以使用起来有一点麻烦。 详细规则 这条规则旨在标记arguments变量。 阅读全文
posted @ 2020-05-15 14:03 鼓舞飞扬 阅读(496) 评论(0) 推荐(0) 编辑
摘要:https://www.jianshu.com/p/dd07cca0a48e 阅读全文
posted @ 2020-05-14 13:24 鼓舞飞扬 阅读(179) 评论(0) 推荐(0) 编辑
摘要:解决方法是:在 .eslintrc 中设置 "rules": { "import/extensions": [2, "never", { "web.js": "never", "json": "never" }], "import/no-extraneous-dependencies": [2, { 阅读全文
posted @ 2020-05-14 11:17 鼓舞飞扬 阅读(6247) 评论(0) 推荐(0) 编辑
摘要:https://www.jianshu.com/p/29ca5a6a34fd 阅读全文
posted @ 2020-05-08 13:19 鼓舞飞扬 阅读(118) 评论(0) 推荐(0) 编辑
摘要:for..in loops iterate over the entire prototype chain, which is virtually never what you want. 意思是使用for..in会遍历整个原型链,这样不是很好的实现方法,推荐使用Object.keys——————— 阅读全文
posted @ 2020-05-08 11:28 鼓舞飞扬 阅读(1202) 评论(0) 推荐(0) 编辑
摘要:配置项⽬按eslint规范格式化代码 vscode下载 ESlint,Prettier,Vetur 插件 打开vscode的设置 添加如图配置(window系统,mac系统配置稍有不同) 可⾃定义eslint的⼀些规则在.eslintrc中覆盖prettier规则即可,覆盖是为了防⽌冲突在rules 阅读全文
posted @ 2020-04-29 15:04 鼓舞飞扬 阅读(1443) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示