prettier格式化时避免删除无用引用

项目中为了保证import的内容按照一定的顺序进行排序,prettier中会引入prettier-plugin-organize-imports插件。但是此插件的默认行为会将引入但是没有使用的包在保存时直接删除掉,查询文档发现为了规避这种破坏性更改需要增加一条配置"organizeImportsSkipDestructiveCodeActions": true, 完整的.prettierrc配置内容为 { "printWidth": 100, "singleQuote": true, "trailingComma": "all", "proseWrap": "never", "Semicolons": true, "organizeImportsSkipDestructiveCodeActions": true, ...

Coming soon

This is 生活随笔, a brand new site by lijinya that's just getting started. Things will be up and running here ...

audio标签

动态替换播放地址 //替换完成后,先执行load方法 document.getElementById('playaudio').load(); 监听播放完成 document.getElementById('playaudio').addEventListener('ended',function(){ console.log('over'); that.playing = false; ...