Skip to content

Add plugin: OneiroMetrics #6715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

banisterious
Copy link

Adding OneiroMetrics!

I am submitting a new Community Plugin

Repo URL

Link to my plugin: https://github.com/banisterious/obsidian-oneirometrics

Release Checklist

  • I have tested the plugin on
    • Windows
    • macOS
    • Linux
    • Android (if applicable)
    • iOS (if applicable)
  • My GitHub release contains all required files (as individual files, not just in the source.zip / source.tar.gz)
    • main.js
    • manifest.json
    • styles.css (optional)
  • GitHub release name matches the exact version number specified in my manifest.json (Note: Use the exact version number, don't include a prefix v)
  • The id in my manifest.json matches the id in the community-plugins.json file.
  • My README.md describes the plugin's purpose and provides clear usage instructions.
  • I have read the developer policies at https://docs.obsidian.md/Developer+policies, and have assessed my plugins's adherence to these policies.
  • I have read the tips in https://docs.obsidian.md/Plugins/Releasing/Plugin+guidelines and have self-reviewed my plugin to avoid these common pitfalls.
  • I have added a license in the LICENSE file.
  • My project respects and is compatible with the original license of any code from other plugins that I'm using.
    I have given proper attribution to these other projects in my README.md.

Copy link

Hello!

I found the following issues in your plugin submission

Errors:

❌ Plugin name mismatch, the name in this PR (Oneirometrics) is not the same as the one in your repo (OneiroMetrics). If you just changed your plugin name, remember to change it in the manifest.json in your repo and your latest GitHub release.


This check was done automatically. Do NOT open a new PR for re-validation. Instead, to trigger this check again, make a change to your PR and wait a few minutes, or close and re-open it.

@github-actions github-actions bot changed the title Add oneirometrics plugin Add plugin: OneiroMetrics Jun 12, 2025
@ObsidianReviewBot
Copy link
Collaborator

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

Required

[1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24][25][26][27][28][29][30] 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][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24][25][26][27][28][29][30] and more :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][2][3][4][5][6][7][8]: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

[1][2][3]: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][2][3][4][5]:This class is only available on desktop, which means that this will throw errors on mobile (that's a problem since you have isDesktopOnly marked as false in your manifest.json file.

[1][2]:You should not cast this, instead use a instanceof check to make sure that it's actually the adapter you expect.

[1][2]:You should not cast this, instead use a instanceof check to make sure that it's actually a file/folder.

[1]:We recommend against providing a default hotkey when possible. The reason being that it's easy to pick a hotkey that a user already has configured and they could get confused when that key doesn't do what they expect. Also, it's hard choosing a safe default hotkey that's available for all operating systems.

[1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24][25][26][27][28][29][30] and more :You should consider limiting the number of console.logs in your code, to not pollute the dev console.


Optional

[1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24][25][26][27][28][29][30] and more :Casting to any should be avoided as much as possible.

[1][2]:Use app.fileManager.trashFile(file: TAbstractFile) instead, this will make sure that the file is deleted according to the users preferences.


Do NOT 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.

@ObsidianReviewBot ObsidianReviewBot added Changes requested Additional review required PR needs to be reviewed by another person, after the currently requested changes have been made and removed Ready for review labels Jun 13, 2025
@banisterious
Copy link
Author

Just added a new release (0.16.2) that includes fixes to an invisible textarea issue, and to a template import issue.

@banisterious
Copy link
Author

banisterious commented Jun 16, 2025

In a new release (0.16.3), I have addressed the issues listed by the Review Bot above:

  1. innerHTML/outerHTML Security - Eliminated XSS vulnerabilities in DOM manipulation
  2. Variable Declarations - All instances found to be appropriate global variable declarations, not regular function-scoped variables
  3. Hardcoded Directories - Removed hardcoded .obsidian path references
  4. Mobile Compatibility - Fixed desktop-only class usage for mobile support
  5. Type Safety - Eliminated unsafe type casting throughout codebase
  6. File Operations - Replaced unsafe file casting with proper type guards
  7. Hotkey Configuration - Removed default hotkey to prevent conflicts
  8. Console Usage - Replaced 39 console statements with structured logging
  9. Any Casting - Fixed 255+ unsafe as any casts with proper TypeScript interfaces
  10. File Deletion - Implemented safe file deletion using fileManager.trashFile
  11. Production Readiness - Enhanced error handling and user notifications

Let me know if I missed anything!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Additional review required PR needs to be reviewed by another person, after the currently requested changes have been made Changes requested plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants