Skip to content

日本式リーチ麻雀用語のローマ字表記をCSpellで許容するための辞書パッケージ / A dictionary package to allow romanization of Japanese-style riichi mahjong terms in CSpell

Notifications You must be signed in to change notification settings

kbkn3/cspell-dict-riichi-mahjong

Repository files navigation

cspell-dict-riichi-mahjong

Overview

CSpell用のカスタム辞書

このパッケージは麻雀のドメイン知識的な用語を日本語表記に合わせてCSpellで対応するためのカスタム辞書です。

必要と思われる単語追加のPRを歓迎します。

各プロダクト固有の単語はリポジトリ内のcspell.json/cspell.yamlでカスタムが可能です。

kbkn3個人としてはローマ字表記を推奨するものではありません。各用語をWRC標準の英語で置き換えることを推奨しています。

WRC標準の英語と日本語の対応表はこちら

English

Custom dictionary for CSpell.

This package is a custom dictionary for CSpell to support mahjong domain knowledge terms in Japanese notation.

If you believe that additional words should be included, please submit a pull request with the approval of two or more repositories.

Words that are specific to each product can be customized in cspell.json in the repository.

Contents

当リポジトリに含まれる辞書は下記の通り。

  • game: 麻雀ゲームの用語
  • pro: 麻雀プロ団体名とMリーグチーム名
  • rule: 麻雀のルール
  • yaku: 麻雀の役
日本語 The dictionaries included in this repository are as follows:
  • game: Mahjong game terms
  • pro: Professional mahjong player's organization name and M-League team name
  • rule: Mahjong rules
  • yaku: Mahjong yaku

Prepare

  1. Install this config as devDependencies.

    npm install -D cspell-dict-riichi-mahjong
  2. Create cspell.json / cspell.yaml to match your repository.

    {
      "version": "0.2",
      "language": "en",
      "import": ["cspell-dict-riichi-mahjong/cspell.yaml"],
      // Add repository-specific terms that are missing from existing dictionaries.
      "words": [
        "chii-nya!",
      ],
      "ignorePaths": ["node_modules/**"],
      "minWordLength": 4
    }

See CSpell Docs for detailed CSpell configuration instructions.

How to use CSpell

チームに合わせて3つの運用方法から選んでください。

  • VScode 拡張機能
    • 長所: VSCode に拡張機能をインストールするだけで使用できる。
    • 短所: 編集中のコードのみスペルチェックされ、リポジトリ全体はチェックされない。
  • CSpell CLI
    • 長所: 動作が速い
    • 短所: コーディング中にスペルミスに気づかない。
  • CSpell-ESLint
    • 長所
      • エディタ上に WARN の下線が表示される
      • 既存の eslint の設定に追記すれば実装が可能
      • エディタの下線部クイックフィックスからリポジトリごとの辞書への追加が可能
    • 短所
      • CSpell 系の設定を追記したあとのpnpm run lintは時間がかかる
  • Github Actions
    • 現在、このリポジトリにはマシンユーザーが追加されていないため、Github Actionsで利用することはできません。要望があれば対応します。

VSCode と CSpell-cli は併用することを推奨します。 CSpell-cli と CSpell-ESLint の併用は役割が被るため非推奨です。

English Consider 3 different methods of operation for your team.
  • VScode extension
    • Pros: You can use it simply by installing an extension to VSCode.
    • Cons: Only the code you are editing will be spell checked, not the entire repository.
  • CSpell-CLI
    • Pros: fast working
    • Cons: Not aware of spelling errors while coding.
  • CSpell-ESLint
    • Pros:
      • WARN underlines on the editor
      • Can be implemented by adding to existing eslint configuration.
      • Underlines can be added to the dictionary for each repository via the editor's underlining quick-fix.
    • Cons:
      • pnpm run lint after adding CSpell system settings takes a long time.
  • Github Actions
    • Currently no machine users have been added to this repository, so it is not available for Github Actions. If requested, this will be addressed.

It is recommended that VSCode and CSpell-CLI be used together. The use of CSpell-CLI and CSpell-ESLint together is deprecated due to their overlapping roles.

Installation

VScode extension

  1. Install Code Spell Checker
  2. Reload Window from cmd + Shift + P

How to Use with VSCode Extension

CSpell CLI

  1. npm install -g cspell or npm install cspell

  2. Register npm-script. example:

      "scripts": {
          "spellcheck": "pnpm cspell ./src --cache --no-progress --config ./cspell.json || exit 0",
          "spellcheck-all": "pnpm cspell ./src --no-progress --config ./cspell.json || exit 0"
      }
  3. (Optional) If you want automatic spell checking on every commit, consider installing husky, etc. Reference: https://zenn.dev/luvmini511/articles/ade1f0e4b64770

ESLint

  1. Install @cspell/eslint-plugin as a dev-dependency

    npm install --save-dev @cspell/eslint-plugin
  2. Add to it to .eslintrc.json

    "extends": ["plugin:@cspell/recommended"]
  3. Example:

    {
     "plugins": ["@cspell"],
     "rules": {
       "@cspell/spellchecker": ["warn", { "checkComments": false, "autoFix": false }]
       }
     }

About

日本式リーチ麻雀用語のローマ字表記をCSpellで許容するための辞書パッケージ / A dictionary package to allow romanization of Japanese-style riichi mahjong terms in CSpell

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages