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

### Required

[[1](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/obsidian-utils.ts#L309)][[2](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/obsidian-utils.ts#L434)][[3](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/react-utils.ts#L81)][[4](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/react-utils.ts#L96)][[5](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/react-utils.ts#L108)][[6](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/components/SpaceEditModal.tsx#L151)]: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/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/components/SidebarManager.tsx#L236)][[2](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/components/SidebarManager.tsx#L239)]: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/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/validation.ts#L205)][[2](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/tests/mocks/obsidian.ts#L23)]: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/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/tests/setup.ts#L5-L7)][[2](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/tests/setup.ts#L8)][[3](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/tests/setup.ts#L9)][[4](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/tests/setup.ts#L10)][[5](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/tests/setup.ts#L11)][[6](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/tests/setup.ts#L12)][[7](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/tests/utils.test.ts#L10-L12)][[8](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/tests/utils.test.ts#L13)][[9](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/tests/utils.test.ts#L14)][[10](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/tests/utils.test.ts#L15)][[11](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/tests/utils.test.ts#L16)][[12](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/tests/utils.test.ts#L17)]:You should change all instances of `var` to either `const` or `let`. `var` has function-level scope, so it can easily lead to bugs if you're not careful. Here's a pretty good guide with examples of why not to use `var`: [why `var` is obsolete](https://javascript.plainenglish.io/4-reasons-why-var-is-considered-obsolete-in-modern-javascript-a30296b5f08f)

[[1](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/obsidian-utils.ts#L500)][[2](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/obsidian-utils.ts#L552)][[3](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/obsidian-utils.ts#L574)][[4](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/obsidian-utils.ts#L594)][[5](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/obsidian-utils.ts#L606)][[6](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/obsidian-utils.ts#L631)][[7](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/obsidian-utils.ts#L647)][[8](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/deletion-detection-utils.ts#L77)][[9](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/deletion-detection-utils.ts#L90)][[10](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/deletion-detection-utils.ts#L110)][[11](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/deletion-detection-utils.ts#L143)][[12](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/deletion-detection-utils.ts#L153)][[13](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/sync-utils.ts#L55)][[14](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/sync-utils.ts#L72)][[15](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/sync-utils.ts#L85)][[16](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/sync-utils.ts#L134)][[17](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/utils/sync-utils.ts#L177)][[18](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/main.ts#L582)][[19](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/main.ts#L588)][[20](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/main.ts#L623)][[21](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/main.ts#L640)][[22](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/main.ts#L730)][[23](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/src/components/SpaceEditModal.tsx#L157)][[24](https://github.com/JinmuGo/obsidian-context-workspaces/blob/ffeedd8fcb9e463583d3e0d9231e444f5c644f58/tests/mocks/obsidian.ts#L15)]:You should consider limiting the number of `console.log`s in your code, to not pollute the dev console.



---



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.