First off, thank you for considering contributing to ViewItAll-md! It's people like you that make this plugin a great tool for the Obsidian community.
Before you start writing code, please read through these critical guidelines. They are enforced rigorously to maintain performance, stability, and the native "zero plugin vibe" of this plugin.
- TypeScript strict. Zero
any. Useunknown+ type guards or define a local interface. - CSS: Obsidian variables only. No hardcoded hex, named colours, or px font-sizes. Only
rgba(0,0,0,N)for shadows. All custom classes must use thevia-prefix. OCD stuff - Icons:
setIcon()+ Lucide only. No emoji as labels. UsesetTooltip()for hover text, not.title =. i adore consistency - No React. Native DOM only. Use Obsidian's
createEl,setIcon,setTooltip, andaddAction. - No hardcoded config. Every key, colour, width, flag must read from
PluginSettings. i mean yah - Build must pass before commit. Run
npm run build(tsc + esbuild). It must pass with zero errors. test test test - No
console.log()in commits. Usenew Notice()for user messages. - Heavy libs: dynamic
import()only. Never use top-level imports for heavy libraries likepptx,epub, orthree.js.
- Clone the repository into your local Obsidian vault's plugins folder:
<VaultFolder>/.obsidian/plugins/ViewItAll-md - Install dependencies:
npm install - Run the development watch process:
npm run dev - Lint your code:
npm run lint(ESLint all src/ files)npm run lint:css(Check styles.css for hardcoded values)
src/main.ts: Lifecycle only — load, unload, register.src/settings.ts: PluginSettings interface, defaults, settings tab.src/types.ts:VIEW_TYPE_*constants and shared types.src/views/: FileView subclasses (keep strictly to one file per type, max 600 lines).src/utils/: Pure functions — no Obsidian state.styles.css: All CSS (single file).
When you are ready to commit, please adhere to our strict commit format.
Format:
type(scope): short description (vX.Y.Z)
- bullet detail
"just small changes"
Types: feat | fix | refactor | style | docs | chore | perf