lijinya

lijinya

Any application that can be written in JavaScript, will eventually be written in JavaScript.

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

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

Episode

00:00:00 00:00:00