1.2.4 • Published 5 years ago
textlint-rule-unexpanded-acronym v1.2.4
textlint-rule-unexpanded-acronym 
textlint rule that found Unexpanded Acronym.
That is, if there exists an acronym ABC in the document, then there must also exist a sequence of capitalized words such as Axxx Bxx Cxxx.
OK:
ABC can stand form the Australian Broadcasting Commission.NG:
I like ABC.
(What does ABC stand for ???)Installation
npm install textlint-rule-unexpanded-acronymUsage
Via CLI
npm install textlint textlint-rule-unexpanded-acronym -D
$(npm bin)/textlint --rule unexpanded-acronym README.mdVia .textlintrc
{
"rules": {
"unexpanded-acronym" : {
"min_acronym_len" : 3
}
}
}Options
min_acronym_len(default:3): Minimum size for the acronymmax_acronym_len(default:5): Maximum size for the acronymignore_acronyms(default:[]): Ignoring acronym List.
{
"rules": {
"unexpanded-acronym" : {
// AB is ignore, ABC is recognized.
"min_acronym_len" : 3,
// GREEEEEEN is ignore
"max_acronym_len" : 5,
// OSS is ignore
"ignore_acronyms" : ["OSS"]
}
}
}Tests
npm testReference
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
License
MIT