• Stars
    star
    109
  • Rank 309,688 (Top 7 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 3 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

SmartHRらしい文書を書くための、textlintルールプリセットを提供します。

textlint-rule-preset-smarthr

SmartHRらしい文書を書くための、textlintルールプリセットを提供します。

インストール

Install with npm:

npm install textlint-rule-preset-smarthr

使い方

Via .textlintrc(Recommended)

Via CLI

textlint --rule preset-smarthr README.md

Build

ソースコードをビルドして、libフォルダに公開します。 TypeScriptのソースコードはsrc/フォルダに書くことができます。

npm run build

Tests

testフォルダ内のテストコードを実行します。 testの詳細はtextlint-testerを参照してください。

npm test

基本設定

すべてのルールを有効化して使う場合は、次のように設定してください。

{
  "rules": {
    "preset-smarthr": true
  }
}

デフォルト設定

デフォルトでは、次のような設定になっています。個別にルールを有効・無効化することも可能です。

{
  "rules": {
    "preset-smarthr": {
      "prh-rules": true,
      "ja-no-mixed-period": true,
      "no-hankaku-kana": true,
      "@textlint-rule/no-unmatched-pair": true,
      "sentence-length": {
        "max": 120
      },
      "no-doubled-conjunctive-particle-ga": true,
      "no-double-negative-ja": true,
      "ja-no-abusage": true,
      "ja-no-redundant-expression": true,
      "no-mixed-zenkaku-and-hankaku-alphabet": true,
      "ja-keishikimeishi": {
        "detection_hou_kata" : false,
        "detection_ue" : false
      },
      "ja-hiragana-fukushi": true,
      "ja-hiragana-hojodoushi": true,
      "ja-hiragana-daimeishi": true,
      "ja-no-space-around-parentheses": true,
      "ja-no-space-between-full-width": true,
      "ja-space-between-half-and-full-width": {
        "space": "never"
      },
      "ja-space-after-exclamation": true,
      "ja-space-after-question": true,
      "ja-space-around-code": false
    }
  }
}

設定ルール一覧

補足1: textlint-rule-preset-ja-spacingのルールプリセットを分解して設定しています。

辞書設定

表記ゆれ修正用の辞書の設定にはtextlint-rule-prhを使っています。 対応用語はdict/フォルダに入っている.ymlを確認してください。

License

MIT

More Repositories

1

smarthr-ui

React components for creating SmartHR applications.
TypeScript
842
star
2

activerecord-bitemporal

BiTemporal Data Model for ActiveRecord
Ruby
197
star
3

yay

SmartHR bootcamp for Ruby and Rails
Ruby
101
star
4

smarthr-design-system

MDX
98
star
5

kiji

e-Gov 外部連携API 連携 gem
Ruby
87
star
6

yokoso

🚪 Slack integration for https://srd-gate.com/03/login.cgi
Ruby
76
star
7

tsubaki

My Number & Corporate Number validator
Ruby
60
star
8

kirico

A Ruby implementation of 届書作成プログラム
Ruby
38
star
9

hello-world

SmartHRのエンジニア採用サイトのソースコード置き場
Astro
37
star
10

activerecord-tenant-level-security

An Active Record extension for Multitenancy with PostgreSQL Row Level Security
Ruby
35
star
11

jpostcode-rb

📮 A Ruby implementation of Japan postcode
Ruby
23
star
12

jpostcode-data

📮 A Japan postcode data source for jpostcode-rb
Ruby
18
star
13

mie

RubyKaigi Takeout 2021 アプリだよ〜
HTML
17
star
14

product-design

Astro
15
star
15

eslint-plugin-smarthr

JavaScript
12
star
16

smarthr-textlint-bot

textlint-rule-preset-smarthr に基づいて Slack上から文書のlintとfixを行えるbotです。
TypeScript
11
star
17

db_schema_checker

Ruby
10
star
18

eslint-config-smarthr

JavaScript
9
star
19

renovate-config

9
star
20

smarthr-oss-guideline

SmartHRのOSSガイドライン
9
star
21

tamatebako

TypeScript
8
star
22

saiyo-tasukete

このリポジトリでは SmartHR 社のエンジニア採用を盛り上げることをします
8
star
23

textlint-ruby

Ruby AST parser for textlint-ruby-plugin
Ruby
7
star
24

smarthr-patterns

TypeScript
6
star
25

omniauth-smarthr

OmniAuth strategy for SmartHR
Ruby
3
star
26

stylelint-config-smarthr

JavaScript
2
star
27

textlint-plugin-ruby

Ruby plugin for textlint
TypeScript
1
star
28

smarthr-normalize-css

TypeScript
1
star