Installations
npm install textlint-rule-terminology
Developer
sapegin
Developer Guide
Module System
ESM
Min. Node Version
>=20
Typescript Support
No
Node Version
20.17.0
NPM Version
10.8.3
Statistics
50 Stars
201 Commits
17 Forks
4 Watching
2 Branches
14 Contributors
Updated on 30 Oct 2024
Languages
TypeScript (99.29%)
JavaScript (0.71%)
Total Downloads
Cumulative downloads
Total Downloads
1,000,528
Last day
62.9%
1,103
Compared to previous day
Last week
-2.4%
4,990
Compared to previous week
Last month
6.6%
19,791
Compared to previous month
Last year
-15.4%
239,036
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
textlint-rule-terminology
Textlint rule to check and fix terms, brands and technologies spelling in your tech writing in English.
For example:
- Javascript → JavaScript
- NPM → npm
- front-end → frontend
- website → site
- Internet → internet
(You can customize the rules as you wish.)
Installation
1npm install textlint-rule-terminology
Usage
1textlint --fix --rule terminology Readme.md
Configuration
You can configure the rule in your .textlintrc
:
1{ 2 "rules": { 3 "terminology": { 4 // Your options here 5 } 6 } 7}
Read more about configuring textlint.
defaultTerms
(default: true
)
Whether to load the default replacements (terms). Example:
1{ 2 "rules": { 3 "terminology": { 4 // Don't load default replacements 5 "defaultTerms": false, 6 } 7 } 8}
skip
(default ['BlockQuote']
)
Syntax elements to skip. By default skips blockquotes. Example:
1{ 2 "rules": { 3 "terminology": { 4 // Don't check terms inside links 5 "skip": ["Link"], 6 } 7 } 8}
See all available element types.
terms
Additional replacements.
Could be an array of replacements:
1{ 2 "rules": { 3 "terminology": { 4 // List of terms 5 "terms": [ 6 // Exact spelling including the case 7 "JavaScript", 8 "ESLint", 9 "Sass", 10 "Less", 11 "npm", 12 // RegExp (case-insensitive) → replacement 13 ["front[- ]end(\\w*)", "frontend$1"], 14 ["back[- ]end(\\w*)", "backend$1"], 15 ["web[- ]?site(s?)", "site$1"], 16 ["hot[- ]key", "hotkey"], 17 ["repo\\b", "repository"], 18 ["CLI tool(s?)", "command line tool$1"], 19 ["build system(s?)", "build tool$1"], 20 ["id['’]?s", "IDs"], 21 ["(\\w+[^.?!]\\)? )webpack", "$1webpack"], 22 ["(\\w+[^.?!]\\)? )internet", "$internet"] 23 ], 24 } 25 } 26}
A path to a JSON file:
1{ 2 "rules": { 3 "terminology": { 4 // Load terms from a file 5 "terms": "~/terms.jsonc", 6 } 7 } 8}
Or an npm module:
1{ 2 "rules": { 3 "terminology": { 4 // Load terms from npm 5 "terms": "@chucknorris/terms", 6 } 7 } 8}
Check out the default replacements.
exclude
If you don’t like any of the default replacements, you can exclude them. For example, to exclude these entries:
1// terms.jsonc 2[ 3 'JavaScript', 4 'API', 5 ['V[ -]?S[ -]?Code', 'Visual Studio Code'], 6 ['walk-through', 'walkthrough'], 7 ['(?<![\\.-])css\\b', 'CSS'] 8];
You need to copy the exact entry (for array, just the first element) to the exclude
option of the terminology
rule in your Textlint config:
1{ 2 "rules": { 3 "terminology": { 4 // Excludes terms 5 "exclude": [ 6 // Simple replacements, the casing should match terms.jsonc entry 7 "JavaScript", 8 "API", 9 // Complex replacements, put only the first array element exactly as 10 // in terms.jsonc 11 "V[ -]?S[ -]?Code", 12 "walk-through", 13 "(?<![\\.-])css\\b" 14 ] 15 } 16 } 17}
Tips & tricks
Use textlint-filter-rule-comments to disable terminology check for particular paragraphs:
1<!-- textlint-disable terminology --> 2 3Oh my javascript! 4 5<!-- textlint-enable -->
Other textlint rules
- textlint-rule-apostrophe — correct apostrophe usage
- textlint-rule-diacritics — words with diacritics
- textlint-rule-quotes — correct quotes usage
- textlint-rule-stop-words — filler words, buzzwords and clichés
Change log
The change log can be found on the Releases page.
Contributing
Bug fixes are welcome, but not new features. Please take a moment to review the contributing guidelines.
Sponsoring
This software has been developed with lots of coffee, buy me one more cup to keep it going.
Authors and license
Artem Sapegin and contributors.
MIT License, see the included License.md file. Also see the project status.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: License.md:0
- Info: FSF or OSI recognized license: MIT License: License.md:0
Reason
packaging workflow detected
Details
- Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yml:7
Reason
7 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5
Reason
5 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-64vr-g452-qvp3
- Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/sapegin/textlint-rule-terminology/node.js.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/sapegin/textlint-rule-terminology/node.js.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/sapegin/textlint-rule-terminology/release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/sapegin/textlint-rule-terminology/release.yml/master?enable=pin
- Info: 0 out of 4 GitHub-owned GitHubAction dependencies pinned
- Info: 2 out of 2 npmCommand dependencies pinned
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/node.js.yml:1
- Warn: no topLevel permission defined: .github/workflows/release.yml:1
- Info: no jobLevel write permissions found
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Score
4
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More