textlint-filter-rule-footnote
v1.1.0
Published
textlint filter rule that ignores errors in footnotes
Maintainers
Readme
textlint-filter-rule-footnote
textlint filter rule that ignores errors in footnotes.
This filter specifically ignores errors from specified rules (default: ja-technical-writing/no-mix-dearu-desumasu) when they occur inside footnotes.
Installation
npm install textlint-filter-rule-footnoteUsage
Add this rule to your .textlintrc (or .textlintrc.json).
{
"filters": {
"footnote": true
},
"rules": {
"preset-ja-technical-writing": true
}
}Configuration
| Option | Type | Default | Description |
|---|---|---|---|
| ruleId | String | String[] | "ja-technical-writing/no-mix-dearu-desumasu" | Rule ID(s) to ignore in footnotes. |
Example
To ignore textlint-rule-no-doubled-joshi in footnotes:
{
"filters": {
"footnote": {
"ruleId": "no-doubled-joshi"
}
}
}Recommended Combination
It is highly recommended to use this rule together with textlint-rule-footnote-dearu-desumasu.
This combination allows you to:
- Ignore global rules (like main text style) inside footnotes using this filter rule.
- Enforce strict "Dearu/Desumasu" style inside footnotes using the recommended rule.
Development
Contributions are welcome!
- Clone the repository:
git clone https://github.com/erutobusiness/textlint-filter-rule-footnote.git cd textlint-filter-rule-footnote - Install dependencies:
npm install - Run tests & lint:
npm test npm run lint npm run format
License
MIT © erutobusiness
