Gathering detailed insights and metrics for textlint-rule-prh
Gathering detailed insights and metrics for textlint-rule-prh
Gathering detailed insights and metrics for textlint-rule-prh
Gathering detailed insights and metrics for textlint-rule-prh
npm install textlint-rule-prh
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
83 Stars
536 Commits
6 Forks
3 Watching
4 Branches
6 Contributors
Updated on 11 Nov 2024
JavaScript (99.87%)
Shell (0.13%)
Cumulative downloads
Total Downloads
Last day
16.7%
12,614
Compared to previous day
Last week
0.8%
54,540
Compared to previous week
Last month
13.3%
233,935
Compared to previous month
Last year
62.8%
1,921,738
Compared to previous year
3
textlint rule for prh/prh: proofreading helper.
This rule check the spell by used with prh.yml
.
npm install textlint-rule-prh
1{ 2 "rules": { 3 "prh": { 4 "rulePaths" :["path/to/prh.yml"] 5 } 6 } 7}
rulePaths
(required) : array of path to YAML file from .textlintrc
file1{ 2 "rules": { 3 "prh": { 4 "rulePaths" :["./prh-rules/rule1.yml", "./prh-rules/rule2.yml"] 5 } 6 } 7}
You can use ~
as Home directory abbreviation.
1{ 2 "rules": { 3 "prh": { 4 "rulePaths" :["~/global-rule/rule1.yml"] 5 } 6 } 7}
checkLink
(optional) : Check Link
node type (default: false
)checkBlockQuote
(optional) : Check BlockQuote
node type (default: false
)checkEmphasis
(optional) : Check Emphasis
node type (default: false
)checkHeader
(optional) : Check Header
node type (default: true
)checkCodeComment
(optional) : Check CodeBlock
node's comment for lang
(default: []
)
lang
array like ["<codeblock-lang>"]
for checking CodeBlock{ "checkCodeComment": ["js", "javascript"] }
OptionsExamples:
1{ 2 "rules": { 3 "prh": { 4 "checkEmphasis": true, 5 "checkHeader": false, 6 "rulePaths" :["./prh.yml"] 7 } 8 } 9}
Check CodeBlock's comment in JavaScript Code.
1{ 2 "rules": { 3 "prh": { 4 "checkCodeComment": ["js", "javascript"], 5 "rulePaths" :["./prh.yml"] 6 } 7 } 8}
textlint-rule-prh
support --fix
feature of textlint.
1textlint --fix README.md
Please See prh/prh: proofreading helper.
prh.yml
can define RegExp as a dictionary.
1# prh version 2version: 1 3rules: 4 5 # format case-sensitive 6 - expected: Cookie 7 # the above is equal to following 8 # - expected: Cookie 9 # pattern: "/[CcCc][OoOo][OoOo][KkKk][IiIi][EeEe]/g" 10 # options: 11 # wordBoundary: false 12 # specs: [] 13 14 # Write test to `expect` 15 - expected: jQuery 16 specs: 17 - from: jquery 18 to: jQuery 19 - from: JQUERY 20 to: jQuery 21 22# If the `specs` is failed、fail to load prh.yml 23# - expected: JavaScript 24# specs: 25# - from: JAVASCRIPT 26# to: JavaScprit 27# Error: JavaScript spec failed. "JAVASCRIPT", expected "JavaScprit", but got "JavaScript", /[JjJj][AaAa][VvVv][AaAa][SsSs][CcCc][RrRr][IiIi][PpPp][TtTt]/g 28 29# pattern => expected 30 - expected: default 31 pattern: deflaut 32 33# Allow to write multiple `pattern` 34 - expected: hardware 35 patterns: 36 - hadware 37 - harrdware 38 - harddware 39 40# Allow to write `pattern` as RegExp 41# Can use $1...$9 42# Should wrap `/` and `/` 43 # ECMAScript 44 - expected: ECMAScript $1 45 patterns: 46 - /ECMAScript([0-9]+)/ 47 - /ECMA Script([0-9]+)/ 48 specs: 49 - from: ECMAScript2015 50 to: ECMAScript 2015 51 52# expected contain pattern 53# https://github.com/textlint-rule/textlint-rule-prh/pull/8 54 - expected: ベンダー 55 pattern: /ベンダ(?!ー)/ 56 specs: 57 - from: ベンダ 58 to: ベンダー 59 - from: ベンダー 60 to: ベンダー 61 # wordBoundary option 62 - expected: js 63 # === pattern: "/\b[JjJj][SsSs]\b/g" 64 options: 65 wordBoundary: true 66 specs: 67 - from: foo JS bar 68 to: foo js bar 69 - from: foo altJS bar 70 to: foo altJS bar
prh.yml
can import other yaml file
1version: 1 2 3imports: 4 - imports-a.yml 5 - imports-b.yml
See example-prh.yml.
npm test
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
14 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
Reason
3 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 5
Details
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Score
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