textlint-rule-no-plain-form-sentence-ending
v1.0.0
Published
textlint rule to detect plain form sentence endings in desumasu-style documents
Maintainers
Readme
textlint-rule-no-plain-form-sentence-ending
textlint rule to detect plain form (常体) sentence endings in desumasu-style (敬体) documents.
analyze-desumasu-dearu does not detect certain plain form patterns. This rule complements it by catching:
- Verb in dictionary form: 「動作する。」
- Auxiliary 「だ」: 「重要だ。」
- Adjective in dictionary form: 「少ない。」
- (Optional) Past tense 「た」: 「完了した。」
Installation
npm install textlint-rule-no-plain-form-sentence-endingUsage
Add this rule to your .textlintrc (or .textlintrc.json).
{
"rules": {
"no-plain-form-sentence-ending": true
}
}Configuration
| Option | Type | Default | Description |
|---|---|---|---|
| detectPastTense | boolean | false | Detect past tense endings like 「した。」「された。」 |
Example
To also detect past tense endings:
{
"rules": {
"no-plain-form-sentence-ending": {
"detectPastTense": true
}
}
}Recommended Combination
Use this rule together with textlint-rule-no-mix-dearu-desumasu for comprehensive style checking.
{
"rules": {
"no-mix-dearu-desumasu": {
"preferInBody": "ですます"
},
"no-plain-form-sentence-ending": true
}
}Development
- Clone the repository:
git clone https://github.com/erutobusiness/textlint-rule-no-plain-form-sentence-ending.git cd textlint-rule-no-plain-form-sentence-ending - Install dependencies:
npm install - Run tests & lint:
npm test npm run lint npm run format
License
MIT © erutobusiness
