https://github.com/textlint-rule/textlint-rule-no-duplicate-abbr
textlint rule that avoid adding duplicated suffix word for Acronyms and Abbreviations.
https://github.com/textlint-rule/textlint-rule-no-duplicate-abbr
textlintrule
Last synced: 11 days ago
JSON representation
textlint rule that avoid adding duplicated suffix word for Acronyms and Abbreviations.
- Host: GitHub
- URL: https://github.com/textlint-rule/textlint-rule-no-duplicate-abbr
- Owner: textlint-rule
- License: mit
- Created: 2021-10-17T07:48:26.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-22T10:55:27.000Z (over 3 years ago)
- Last Synced: 2025-06-04T18:48:37.056Z (22 days ago)
- Topics: textlintrule
- Language: TypeScript
- Size: 355 KB
- Stars: 2
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @textlint-rule/textlint-rule-no-duplicate-abbr
[textlint](https://github.com/textlint/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".
## Supported Languages
- {Acronyms or Abbreviations} + English
- {Acronyms or Abbreviations} + Japanese## Install
Install with [npm](https://www.npmjs.com/):
npm install @textlint-rule/textlint-rule-no-duplicate-abbr
## Usage
Via `.textlintrc`(Recommended)
```json
{
"rules": {
"@textlint-rule/no-duplicate-abbr": true
}
}
```Via CLI
```
textlint --rule @textlint-rule/no-duplicate-abbr README.md
```## Options
```ts
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:
```json5
{
"rules": {
"@textlint-rule/no-duplicate-abbr": {
"allowAbbrList": ["NPO"] // Allow to use "NPO organization"
}
}
}
```## Changelog
See [Releases page](https://github.com/textlint-rule/textlint-rule-no-duplicate-abbr/releases).
## References
- Abbr dictionary: wikipedia
based
- Synonyms: sudashi## Running tests
Install devDependencies and Run `yarn test`:
yarn install
yarn test## Contributing
Pull requests and stars are always welcome.
For bugs and feature
requests, [please create an issue](https://github.com/textlint-rule/textlint-rule-no-duplicate-abbr/issues).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## Author
- [github/azu](https://github.com/azu)
- [twitter/azu_re](https://twitter.com/azu_re)## License
MIT © azu