Skip to content

textlint rule that avoid adding duplicated suffix word for Acronyms and Abbreviations.

License

Notifications You must be signed in to change notification settings

textlint-rule/textlint-rule-no-duplicate-abbr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@textlint-rule/textlint-rule-no-duplicate-abbr

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:

npm install @textlint-rule/textlint-rule-no-duplicate-abbr

Usage

Via .textlintrc(Recommended)

{
  "rules": {
    "@textlint-rule/no-duplicate-abbr": true
  }
}

Via CLI

textlint --rule @textlint-rule/no-duplicate-abbr README.md

Options

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"
    }
  }
}

Changelog

See Releases page.

References

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.

  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

License

MIT © azu

About

textlint rule that avoid adding duplicated suffix word for Acronyms and Abbreviations.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published