← ClaudeAtlas

obsidian-plugin-lintlisted

Use when asked to lint, check, or review an Obsidian plugin's CSS or code for style violations. Triggers on "lint", "检查代码", "check styles", before committing/releasing a plugin, or when seeing submission bot warnings: "Avoid !important", "Use the full 6-digit hex format", "Unexpected duplicate", "Unexpected browser feature", "Unexpected unknown type selector", "Unsafe assignment to innerHTML", "Sets styles directly instead of using CSS classes", "Unsafe call of an error or any typed value", "Unsafe member access on an error or any typed value", "Unsafe assignment of an error or any typed value", "Passes unsafe values into typed parameters", "This assertion is unnecessary since the receiver accepts the original type of the expression", "This assertion is unnecessary since it does not change the type of the expression", "overrides all other types in this union type", "display is deprecated", "Use getSettingDefinitions instead", "does not implement getSettingDefinitions", "will not appear in Obsidian's settings
tcyeee/obsidian-plugin-lint · ★ 0 · Code & Development · score 75
Install: claude install-skill tcyeee/obsidian-plugin-lint
# Obsidian Plugin Lint ## Overview Static analysis pass for Obsidian plugin code. Covers both official Obsidian ESLint rules and general CSS best practices. Run before every release. ## Rules ### Official Obsidian ESLint Plugin Rules (`obsidianmd/eslint-plugin`) Source: https://github.com/obsidianmd/eslint-plugin | Rule | What to check | Fix | |------|---------------|-----| | `no-static-styles-assignment` | `el.style.color = ...`, `el.style.cssText = ...`, `el.style.display = ...` (any inline style via JS) | CSS class: `el.addClass('my-class')`. For dynamic values: `setCssProps(el, { '--my-var': value })` or `setCssStyles(el, { display: value })` | | `no-unsupported-api` | An API whose current signature is newer than `minAppVersion` (e.g. `workspace.revealLeaf` returning `Promise<void>` requires 1.7.2) | Bump `manifest.json` `minAppVersion` to the version that introduced the API; see section below | | `obsidianmd/commands` (no plugin name) | `addCommand({ name })` repeats the plugin name (`"Open Day Echo timeline"` for plugin "Day Echo") | Drop the plugin name — Obsidian already prefixes it. `name: "Open timeline"` | | Sentence case | Button labels, settings headings, command names must use sentence case | Capitalize only first word and proper nouns | | No default hotkeys | `addCommand()` must not set `hotkeys: [...]` | Remove default hotkeys; let user configure | | No `innerHTML` | Any `el.innerHTML = ...` assignment (not just user input) | Use `el.createEl()`, `el.cre