textlint-rule-footnote-dearu-desumasu
v1.2.0
Published
textlint rule to check mixed writing style (dearu/desumasu) in footnotes
Downloads
42
Maintainers
Readme
textlint-rule-footnote-dearu-desumasu
textlint rule to check mixed writing style (Dearu/Desumasu) in footnotes.
This rule enforces a consistent writing style ("Desumasu" or "Dearu") specifically within footnotes, independently of the main text.
Installation
npm install textlint-rule-footnote-dearu-desumasuUsage
Add this rule to your .textlintrc (or .textlintrc.json).
{
"rules": {
"footnote-dearu-desumasu": true
}
}Configuration
| Option | Type | Default | Description |
|---|---|---|---|
| prefer | "ですます" | "である" | "ですます" | Preferred style in footnotes. |
Example
To prefer "Dearu" style in footnotes:
{
"rules": {
"footnote-dearu-desumasu": {
"prefer": "である"
}
}
}Recommended Combination
It is highly recommended to use this rule together with textlint-filter-rule-footnote.
This combination allows you to:
- Ignore global rules (like main text style) inside footnotes using the filter rule.
- Enforce strict "Dearu/Desumasu" style inside footnotes using this rule.
Example .textlintrc:
{
"filters": {
"footnote": true
},
"rules": {
"preset-ja-technical-writing": true,
"footnote-dearu-desumasu": {
"prefer": "ですます"
}
}
}Development
Contributions are welcome!
- Clone the repository:
git clone https://github.com/erutobusiness/textlint-rule-footnote-dearu-desumasu.git cd textlint-rule-footnote-dearu-desumasu - Install dependencies:
npm install - Run tests & lint:
npm test npm run lint npm run format
License
MIT © erutobusiness
