textlint rule that avoid adding duplicated suffix word for Acronyms and Abbreviations.
OK:
BGP is Border Gateway Protocol.
NG:
This is BGP protocol.
DAO object is Data Access Object.
これはBGPプロトコルです。
You can avoid using "DAO Object" - "Data Access Object Object".
- {Acronyms or Abbreviations} + English
- {Acronyms or Abbreviations} + Japanese
Install with npm:
npm install @textlint-rule/textlint-rule-no-duplicate-abbr
Via .textlintrc
(Recommended)
{
"rules": {
"@textlint-rule/no-duplicate-abbr": true
}
}
Via CLI
textlint --rule @textlint-rule/no-duplicate-abbr README.md
export type Options = {
/**
* A list for ignoring Acronyms or Abbreviations.
* e.g. you can allow "NPO organization" by following setting.
* "allowAbbrList": ["NPO"]
*/
allowAbbrList: string[];
}
Example setting:
{
"rules": {
"@textlint-rule/no-duplicate-abbr": {
"allowAbbrList": ["NPO"] // Allow to use "NPO organization"
}
}
}
See Releases page.
- Abbr dictionary: wikipedia based https://docs.google.com/spreadsheets/d/1mtrE2wxlasDVZXcpLcLE26EUaX12aAOkbKed9oTcVNk/edit#gid=877500418
- Synonyms: sudashi https://github.com/azu/sudachi-synonyms-dictionary
Install devDependencies and Run yarn test
:
yarn install
yarn test
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
- 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
MIT © azu