
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
textlint-rule-max-ten
Advanced tools
textlint rule is that limit maximum ten(、) count of sentence.
一文に利用できる、
の数を制限するtextlintルール
一文の読点の数が多いと冗長で読みにくい文章となるため、読点の数を一定数以下にするルールです。 読点の数を減らすためには、句点(。)で文を区切る必要があります。
npm install textlint-rule-max-ten
$ npm install textlint textlint-rule-max-ten
$ textlint --rule max-ten README.md
# 11:0 error 一つの文で"、"を3つ以上使用しています max-ten
max
: number
{
"rules": {
"max-ten": {
// 1文に利用できる最大の、の数
// max: 3の場合は4つ以上の読点でエラーとなる
"max": 3,
// 例外ルールを適応するかどうか,
"strict": false,
// 読点として扱う文字
// https://ja.wikipedia.org/wiki/%E8%AA%AD%E7%82%B9
"touten": "、",
// 句点として扱う文字
// https://ja.wikipedia.org/wiki/%E5%8F%A5%E7%82%B9
"kuten": "。"
}
}
}
読点に「,」句点に「.」を使う場合は、次のように設定します。
{
"rules": {
"max-ten": {
// 読点として扱う文字
"touten": ",",
// 句点として扱う文字
"kuten": "."
}
}
}
<名詞>
、<名詞>
のように名詞に挟まれた読点はカウントしません。 箇条書きとしての区切り文字として使われているため無視します。
<名詞>(A)、<名詞>(B)、<名詞>(C)
のように名詞を説明する括弧が、
に隣接するケースも、名詞に挟まれた読点としてカウントしません。
npm test
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT
FAQs
textlint rule that limit maxinum ten(、) count of sentence.
The npm package textlint-rule-max-ten receives a total of 28,996 weekly downloads. As such, textlint-rule-max-ten popularity was classified as popular.
We found that textlint-rule-max-ten demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.