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

### Required

[[1](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L160)][[2](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L161)][[3](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L162)][[4](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L166)][[5](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L167)][[6](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L168)][[7](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L169)][[8](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L170)][[9](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L204)][[10](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L205)][[11](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L206)][[12](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L382)][[13](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L386)][[14](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L396)][[15](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L602)][[16](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L1062)][[17](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L1063)][[18](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L1064)][[19](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L1153)][[20](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L1154)][[21](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L1155)][[22](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L1156)][[23](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L1157)][[24](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L1158)][[25](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L1159)][[26](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L1160)][[27](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L1161)][[28](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L1172)][[29](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L1175)][[30](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L1461)] and more :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/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/src/icons.ts#L56)][[2](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/src/icons.ts#L65)]: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/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/src/views/Modals.ts#L356)][[2](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/src/views/SidePanelView.ts#L117)]:Obsidian's configuration directory isn't necessarily `.obsidian`, it can be configured by the user. You can access the configured value from `Vault#configDir`

[[1](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/src/api/ApiInterface.ts#L89)][[2](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/src/api/ApiInterface.ts#L102)][[3](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/src/api/SyncService.ts#L74)][[4](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/src/api/SyncService.ts#L81)][[5](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/src/api/SyncService.ts#L286)][[6](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestSetup.ts#L449)][[7](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestSetup.ts#L463)][[8](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestSetup.ts#L466)][[9](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestSetup.ts#L467)][[10](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestSetup.ts#L473)][[11](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestSetup.ts#L476)][[12](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestSetup.ts#L478)][[13](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L32)][[14](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L33)][[15](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L40)][[16](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L41)][[17](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L57)][[18](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L60)][[19](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L72)][[20](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L73)][[21](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L74)][[22](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L76)][[23](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L77)][[24](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L78)][[25](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L79)][[26](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L82)][[27](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L83)][[28](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L87)][[29](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L89)][[30](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/TestRunner.ts#L96)] and more :You should consider limiting the number of `console.log`s in your code, to not pollute the dev console.



---

### Optional

[[1](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L3060)][[2](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/main-old.ts#L3061)][[3](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/src/views/Modals.ts#L355)][[4](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/src/views/Modals.ts#L356)][[5](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/src/views/SidePanelView.ts#L116)][[6](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/src/views/SidePanelView.ts#L117)][[7](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/src/settings/Settings.ts#L655)][[8](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/src/api/HttpServer.ts#L387)][[9](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/HttpServer.test.ts#L16)][[10](https://github.com/zafrem/obsidian-role-switch/blob/66b381c06b5ad042383fac9a54cf663902a2d6f9/test/Integration.test.ts#L16)]: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.