Thank you for your submission, an automated scan of your plugin code's revealed the following issues:

### Required

[[1](https://github.com/SheldonLiu0412/weread-formatter/blob/f0de7b4ad9d7f3e0b038a0360b58a89ba6beedb6/main.js)]:Please remove the `main.js` file from the repo and add it to your .gitignore. Compiled release files shouldn't get mixed with source code in your commits and should go to the releases files instead.

[[1](https://github.com/SheldonLiu0412/weread-formatter/blob/f0de7b4ad9d7f3e0b038a0360b58a89ba6beedb6/main.ts#L116)][[2](https://github.com/SheldonLiu0412/weread-formatter/blob/f0de7b4ad9d7f3e0b038a0360b58a89ba6beedb6/main.ts#L460)]:Using `innerHTML`, `outerHTML` or similar API's is a security risk. Instead, use the DOM API or the Obsidian helper functions: <https://docs.obsidian.md/Plugins/User+interface/HTML+elements>

[[1](https://github.com/SheldonLiu0412/weread-formatter/blob/f0de7b4ad9d7f3e0b038a0360b58a89ba6beedb6/main.ts#L491)]:You should avoid assigning styles via JavaScript or in HTML and instead move all these styles into CSS so that they are more easily adaptable by themes and snippets.


[[1](https://github.com/SheldonLiu0412/weread-formatter/blob/f0de7b4ad9d7f3e0b038a0360b58a89ba6beedb6/main.ts#L1042)]:Do not detach leaves with your custom view in `onunload`, this is an antipattern, see: <https://docs.obsidian.md/Plugins/Releasing/Plugin+guidelines#Don't+detach+leaves+in+%60onunload%60>



---

### Optional

[[1](https://github.com/SheldonLiu0412/weread-formatter/blob/f0de7b4ad9d7f3e0b038a0360b58a89ba6beedb6/main.ts#L372)][[2](https://github.com/SheldonLiu0412/weread-formatter/blob/f0de7b4ad9d7f3e0b038a0360b58a89ba6beedb6/main.ts#L438)]:Casting to `any` should be avoided as much as possible.



---



Do <b>NOT</b> open a new PR for re-validation.
Once you have pushed all of the required changes to your repo, the bot will update the labels on this PR within 6 hours.
If you think some of the required changes are incorrect, please comment with `/skip` and the reason why you think the results are incorrect.