Skip to content

Commit

Permalink
textlint導入
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Jul 7, 2022
1 parent 10fa2e0 commit 1398417
Show file tree
Hide file tree
Showing 6 changed files with 5,116 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/lint_markdowns.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: textlint

on:
push:
branches:
- master
pull_request:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14.x

- name: Npm install
run: |
npm ci
- name: Running lint
run: npm run lint
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Node.js
node_modules/
38 changes: 38 additions & 0 deletions .textlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"rules": {
// 文章中の同義語を表記ゆれをチェックする
// https://github.com/textlint-ja/textlint-rule-no-synonyms
"@textlint-ja/no-synonyms": true,
// 漢字よりもひらがなで表記したほうが読みやすい形式名詞を指摘する
// https://github.com/lostandfound/textlint-rule-ja-hiragana-keishikimeishi
"ja-hiragana-keishikimeishi": true,
// よくある誤用をチェックする
// https://github.com/textlint-ja/textlint-rule-ja-no-abusage
"ja-no-abusage": true,
// 冗長な表現を禁止する
// https://github.com/textlint-ja/textlint-rule-ja-no-redundant-expression
"ja-no-redundant-expression": true,
// 漢字が連続する最大文字数を制限する(最大5文字)
// https://github.com/textlint-ja/textlint-rule-max-kanji-continuous-len
"max-kanji-continuous-len": {
max: 5,
},
// ら抜き言葉を検出する
// https://github.com/textlint-ja/textlint-rule-no-dropping-the-ra
"no-dropping-the-ra": true,
// 全角と半角アルファベットの混在をチェックする
// https://github.com/textlint-ja/textlint-rule-no-mixed-zenkaku-and-hankaku-alphabet
"no-mixed-zenkaku-and-hankaku-alphabet": true,
// インラインコードの前後にスペースを入れる
// https://github.com/textlint-ja/textlint-rule-preset-ja-spacing/tree/master/packages/textlint-rule-ja-space-around-code
"ja-space-around-code": {
"before": true,
"after": true,
},
// ymlファイルをもとに表記をチェックする
// https://github.com/textlint-rule/textlint-rule-prh
"prh": {
"rulePaths": ["prh-rules/wordpress.yml"],
}
}
}
Loading

0 comments on commit 1398417

Please sign in to comment.