textlint plugin to lint Typst
npm install textlint-plugin-typst



``shnpm
npm install textlint-plugin-typst
Usage
`json
{
"plugins": {
"typst": true
}
}
`Options
-
extensions: string[]
- Additional file extensions for TypstSyntax support
This plugin supports the syntax of Typst v0.14.2.
Legend for syntax support:
- ✅: Supported
- 🚫: Not in progress
- ⌛️: In progress
- ⚠️: Partially supported (with some caveats)
| Typst | textlint | Markup | Function |
| --- | --- | --- | --- |
| Paragraph break | Paragraph | ✅ | 🚫 |
| Strong emphasis | Strong | ✅ | 🚫 |
| Emphasis | Emphasis | ✅ | 🚫 |
| Raw text | Code / CodeBlock | ✅ | 🚫 |
| Link | Link | ✅ | 🚫 |
| Label | | 🚫 | 🚫 |
| Reference | | 🚫 | 🚫 |
| Heading | Header | ✅ | 🚫 |
| Bullet list | List / ListItem | ✅ | 🚫 |
| Numbered list | List / ListItem | ✅ | 🚫 |
| Term list | | 🚫 | 🚫 |
| Math | Code / CodeBlock | ✅ | 🚫 |
| Line break | Break | ✅ | 🚫 |
| Smart quote | | 🚫 | 🚫 |
| Symbol shorthand | | 🚫 | 🚫 |
| Code expression | | ✅ | ✅ |
| Character escape | | 🚫 | 🚫 |
| Comment | Comment | ✅ | 🚫 |
Examples
$3
Example of how to use textlint-filter-rule-comments is shown below.
`typst
This is error text./ textlint-disable /
This is ignored text by rule.
Disables all rules between comments
/ textlint-enable /
This is error text.
`Also, you can use single-line comments.
`typst
This is error text.// textlint-disable
This is ignored text by rule.
Disables all rules between comments
// textlint-enable
This is error text.
`Contributing
This project is still under development, so please feel free to contribute!
1. Fork it!
2. Create your feature branch:
git checkout -b my-new-feature
3. Commit your changes: git commit -am 'Add some feature'
4. Push to the branch: git push origin my-new-feature`- @3w36zj6