textlint-plugin-obsidian
v0.2.5
Published
textlint plugin for Obsidian-flavored markdown
Maintainers
Readme
textlint-plugin-obsidian
Obsidian-flavored Markdown support for textlint.
Parses Obsidian-specific syntax — wikilinks, embeds, callouts, highlights, and comments — so textlint rules can lint their text content.
Installation
npm install textlint-plugin-obsidianUsage
Add obsidian to the plugins section of your .textlintrc:
{
"plugins": ["obsidian"],
"rules": {}
}Supported file extensions
.md, .markdown
Custom extensions can be added via the extensions option:
{
"plugins": {
"obsidian": {
"extensions": [".mdx"]
}
}
}Supported Obsidian syntax
Wikilink — [[Page]]
Internal links. The display text (value) is lintable.
[[Page Name]]
[[Page Name|Alias]]
[[Page Name#Heading]]
[[#Heading]]AST node type: WikiLink
| Property | Type | Description |
| --------- | ---------------- | --------------------------------------------- |
| value | string | Display text (alias if set, else target name) |
| target | string | Target page name |
| heading | string \| null | Section anchor (#...), or null |
| alias | string \| null | Custom display text (\|...), or null |
Embed — ![[File]]
Embedded content (images, notes, PDFs, etc.). The display text (value) is lintable.
![[image.png]]
![[Note]]
![[Note|300]]AST node type: WikiEmbed (same properties as WikiLink)
Callout — > [!TYPE]
Block callouts. The title and body children are fully lintable.
> [!NOTE] Optional title
> Body content
> [!WARNING]+ Foldable callout
> Expanded by default
> [!TIP]- Collapsed by default
> Hidden initiallyAST node type: Callout
| Property | Type | Description |
| ----------------- | --------- | ------------------------------------------- |
| calloutType | string | Callout type (e.g. "NOTE", "WARNING") |
| title | string | Display title (falls back to calloutType) |
| foldable | boolean | true when + or - suffix present |
| defaultExpanded | boolean | false when - suffix |
| children | Node[] | Body nodes (fully lintable) |
Highlight — ==text==
Highlighted text. The inner content is lintable.
==highlighted text==AST node type: Highlight
Comment — %%text%%
Hidden comments. Content is excluded from linting by standard rules.
%%This is a hidden comment%%AST node type: ObsidianComment
License
MIT
