npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

textlint-rule-ja-hiraku

v1.2.0

Published

漢字を「ひらく」ためのtextlintルール

Downloads

102

Readme

textlint-rule-ja-hiraku

npm version Node.js CI textlint rule

textlint-rule-ja-hiraku は漢字を「ひらく」ためのtextlintルールです。

「ひらく」というのは、漢字の読みや文字から受ける印象を考慮し一部をひらがなで表記することで、読みやすく誤読しにくい文章へと変えることです。 漢字とひらがな、どちらで書くかが統一されるので、表記揺れを減らすことにも繋がります。

例:

丁度良かった。色々話を聞いて頂きたいと思っていた所でした。
↓
ちょうどよかった。いろいろ話を聞いていただきたいと思っていたところでした。

インストール

npm install -g textlint-rule-ja-hiraku

使い方

.textlintrc.json を利用する場合 (推奨):

{
  "rules": {
    "ja-hiraku": true
  }
}

CLIから利用する場合:

textlint --rule ja-hiraku README.md

設定

形態素の格ごとにチェックするかどうかを切り替え可能です。

デフォルトでは全てチェック対象となっていますが、 ほどんどのケースでは以下のように代名詞・副助詞・副詞・補助動詞・補助形容詞・形式名詞・連体詞・接続詞のチェックだけで十分かもしれません。

{
  "rules": {
    "ja-hiraku": {
      "daimeishi": true,        // 代名詞のチェック (default: true)
      "fukujoshi": true,        // 副助詞のチェック (default: true)
      "fukushi": true,          // 副詞のチェック (default: true)
      "hojodoushi": true,       // 補助動詞のチェック (default: true)
      "hojokeiyoushi": true,    // 補助形容詞のチェック (default: true)
      "keishikimeishi": true,   // 形式名詞のチェック (default: true)
      "other-doushi": false,    // その他 (動詞) のチェック (default: true)
      "other-jodoushi": false,  // その他 (助動詞) のチェック (default: true)
      "other-kandoushi": false, // その他 (感動詞) のチェック (default: true)
      "other-keiyoushi": false, // その他 (形容詞) のチェック (default: true)
      "other-meishi": false,    // その他 (名詞) のチェック (default: true)
      "rentaishi": true,        // 連体詞のチェック (default: true)
      "setsuzokushi": true,     // 接続詞のチェック (default: true)
    },
  }
}

開発

ビルド

npm run build

テスト

textlint-tester を利用してテストします。

npm test

参考文献

開発するにあたり、以下の書籍やページを参考にさせていただきました。