https://github.com/textlint-rule/textlint-rule-en-max-word-count
textlint rule that specify the maximum word count of a sentence.
https://github.com/textlint-rule/textlint-rule-en-max-word-count
english textlintrule
Last synced: 5 months ago
JSON representation
textlint rule that specify the maximum word count of a sentence.
- Host: GitHub
- URL: https://github.com/textlint-rule/textlint-rule-en-max-word-count
- Owner: textlint-rule
- License: mit
- Created: 2016-03-20T06:10:02.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-02-13T12:44:20.000Z (almost 3 years ago)
- Last Synced: 2025-07-02T15:18:02.068Z (6 months ago)
- Topics: english, textlintrule
- Language: TypeScript
- Size: 164 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# textlint-rule-en-max-word-count [](https://github.com/textlint-rule/textlint-rule-en-max-word-count/actions?query=workflow%3A"test")
[textlint](https://github.com/textlint/textlint "textlint") rule that specify the maximum word count of a sentence.
## Installation
npm install textlint-rule-en-max-word-count
## Usage
Via `.textlintrc`(Recommended)
```json5
{
"rules": {
"en-max-word-count": {
"max" : 50
}
}
}
```
Via CLI
```
textlint --rule en-max-word-count README.md
```
### Options
`.textlintrc` options.
```json5
{
"rules": {
"en-max-word-count": {
// max count of words and report error if exceed
"max" : 50
}
}
}
```
## Example
### OK :green_heart:
max: 4
This is a pen.
### NG :negative_squared_cross_mark:
max: 4
So, this is a pen.
// => Exceeds the maximum word count of 4.
## Tests
npm test
## Contributing
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`
5. Submit a pull request :D
## License
MIT