Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
textlint-rule-prh
Advanced tools
textlint rule for prh/prh: proofreading helper.
This rule check the spell by used with prh.yml
.
npm install textlint-rule-prh
{
"rules": {
"prh": {
"rulePaths" :["path/to/prh.yml"]
}
}
}
rulePaths
(required) : array of path to YAML file from .textlintrc
file{
"rules": {
"prh": {
"rulePaths" :["./prh-rules/rule1.yml", "./prh-rules/rule2.yml"]
}
}
}
You can use ~
as Home directory abbreviation.
{
"rules": {
"prh": {
"rulePaths" :["~/global-rule/rule1.yml"]
}
}
}
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
){
"rules": {
"prh": {
"checkEmphasis": true,
"checkHeader": false
}
}
}
textlint-rule-prh
support --fix
feature of textlint.
textlint --fix README.md
Please See prh/prh: proofreading helper.
prh.yml
can define RegExp as a dictionary.
# prh version
version: 1
rules:
# format case-sensitive
- expected: Cookie
# the above is equal to following
# - expected: Cookie
# pattern: "/[CcCc][OoOo][OoOo][KkKk][IiIi][EeEe]/g"
# options:
# wordBoundary: false
# specs: []
# Write test to `expect`
- expected: jQuery
specs:
- from: jquery
to: jQuery
- from: JQUERY
to: jQuery
# If the `specs` is failed、fail to load prh.yml
# - expected: JavaScript
# specs:
# - from: JAVASCRIPT
# to: JavaScprit
# Error: JavaScript spec failed. "JAVASCRIPT", expected "JavaScprit", but got "JavaScript", /[JjJj][AaAa][VvVv][AaAa][SsSs][CcCc][RrRr][IiIi][PpPp][TtTt]/g
# pattern => expected
- expected: default
pattern: deflaut
# Allow to write multiple `pattern`
- expected: hardware
patterns:
- hadware
- harrdware
- harddware
# Allow to write `pattern` as RegExp
# Can use $1...$9
# Should wrap `/` and `/`
# ECMAScript
- expected: ECMAScript $1
patterns:
- /ECMAScript([0-9]+)/
- /ECMA Script([0-9]+)/
specs:
- from: ECMAScript2015
to: ECMAScript 2015
# expected contain pattern
# https://github.com/textlint-rule/textlint-rule-prh/pull/8
- expected: ベンダー
pattern: /ベンダ(?!ー)/
specs:
- from: ベンダ
to: ベンダー
- from: ベンダー
to: ベンダー
# wordBoundary option
- expected: js
# === pattern: "/\b[JjJj][SsSs]\b/g"
options:
wordBoundary: true
specs:
- from: foo JS bar
to: foo js bar
- from: foo altJS bar
to: foo altJS bar
prh.yml can import other yaml file
version: 1
imports:
- imports-a.yml
- imports-b.yml
See textlint-rule/prh-textlint-example: Example of textlint + prh..
npm test
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT
FAQs
textlint rule for prh.
The npm package textlint-rule-prh receives a total of 38,513 weekly downloads. As such, textlint-rule-prh popularity was classified as popular.
We found that textlint-rule-prh demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.