obsidian-plugin-validator
Run Obsidian's community-plugin review checks on your own machine, before you open a submission PR. It replicates the mechanical parts of the review so you can fix problems in seconds instead of waiting on a reviewer round-trip.
It does two things:
- Manifest & submission checks (in Node, no plugin execution): validates manifest.json against the submission requirements (required/allowed keys, forbidden words, id/version/description format), confirms versions.json has an entry for the current version, and checks for README.md and LICENSE.
- ESLint with the official eslint-plugin-obsidianmd recommended ruleset (no innerHTML, detach leaves on unload, Platform guards for Node APIs, sentence-case UI text, no console.log, restricted globals, and more).
Examples
A clean run, every check passed:
A failing run, with the specific problems to fix before submitting:
Usage
The fastest way, no install, run it straight from npm against any plugin folder:
npx obsidian-plugin-validator ~/dev/my-pluginOr from inside your plugin's folder (defaults to the current directory):
cd ~/dev/my-plugin
npx obsidian-plugin-validatorInstall it globally if you run it often:
npm install -g obsidian-plugin-validator
obsidian-plugin-validator ~/dev/my-pluginFrom source
git clone https://github.com/philpalmieri/obsidian-plugin-validator.git
cd obsidian-plugin-validator
npm install
node bin/cli.mjs ~/dev/my-pluginOptions
| Flag | Description | | --- | --- | | --src <dir | Source folder to lint (default: src) | | --no-lint | Run manifest/file checks only, skip ESLint | | --fix | Apply ESLint autofixes where possible | | --no-typed | Disable type-aware linting (some obsidianmd rules get skipped) | | --tsconfig <p | tsconfig path for type-aware linting (default: ./tsconfig.json) | | -h, --help | Show help |