Skip to content

Commit

Permalink
feat: add textlint
Browse files Browse the repository at this point in the history
  • Loading branch information
9renpoto committed Jan 3, 2024
1 parent 0e3e9b3 commit 0802bf4
Show file tree
Hide file tree
Showing 14 changed files with 82 additions and 26 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ updates:
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: npm
directory: "/"
schedule:
interval: "daily"
3 changes: 3 additions & 0 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ permissions:

jobs:
test:
timeout-minutes: 5
runs-on: ubuntu-latest

steps:
Expand All @@ -44,6 +45,8 @@ jobs:
- name: Run linter
run: deno lint

- run: deno task lint "posts/**"

- name: Run tests
run: deno test -A --coverage=coverage

Expand Down
29 changes: 29 additions & 0 deletions .textlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"filters": {
"comments": true
},
"rules": {
"incremental-headers": true,
"ja-no-mixed-period": true,
"ja-no-successive-word": true,
"ja-no-weak-phrase": true,
"max-ten": {
"max": 3
},
"no-dead-link": {
"ignore": []
},
"no-double-negative-ja": true,
"no-doubled-conjunction": true,
"no-doubled-conjunctive-particle-ga": true,
"no-doubled-joshi": {

Check warning on line 19 in .textlintrc.json

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (joshi)
"min_interval": 1
},
"no-dropping-the-ra": true,
"no-hankaku-kana": true,

Check warning on line 23 in .textlintrc.json

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (hankaku)
"no-mix-dearu-desumasu": true,

Check warning on line 24 in .textlintrc.json

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (dearu)

Check warning on line 24 in .textlintrc.json

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (desumasu)
"no-nfd": true,
"preset-ja-spacing": true,
"preset-jtf-style": true
}
}
1 change: 1 addition & 0 deletions __tests__/deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@

export { DOMParser } from "https://deno.land/x/deno_dom@v0.1.37/deno-dom-wasm.ts";
export { render } from "https://esm.sh/@testing-library/preact@3.2.2";
import "npm:textlint@^13.3.3";

Check warning on line 9 in __tests__/deps.ts

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (textlint)
20 changes: 17 additions & 3 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
"tasks": {
"start": "deno run -A --watch=static/,routes/ dev.ts",
"build": "deno run -A dev.ts build",
"lint": "deno run -A npm:textlint",

Check warning on line 7 in deno.json

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (textlint)
"preview": "deno run -A main.ts"
},
"compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" },
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "preact"

Check warning on line 12 in deno.json

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (preact)
},
"lock": false,
"imports": {
"$fresh/": "https://deno.land/x/fresh@1.6.1/",
Expand All @@ -24,6 +28,16 @@
"$gfm": "https://deno.land/x/gfm@0.1.26/mod.ts",
"$ga4": "https://raw.githubusercontent.com/denoland/ga4/main/mod.ts"
},
"lint": { "rules": { "tags": ["fresh", "recommended"] } },
"exclude": ["**/_fresh/*", "cache"]
"lint": {
"rules": {
"tags": [
"fresh",
"recommended"
]
}
},
"exclude": [
"**/_fresh/*",
"cache"
]
}
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"devDependencies": {
"@9renpoto/textlint-config-ja": "^7.0.0"
}
}
2 changes: 1 addition & 1 deletion posts/2016/08/11/module-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ category: js

# TypeScript で power-assert を使いたい

[TypeScript テストについて](https://9renpoto.win/2016/06/23/typescript-module-test/)
[TypeScript テストについて](/entry/2016/06/23/typescript-module-test/)
少し調べました。

- <https://github.com/9renpoto/ts/pull/31>
Expand Down
2 changes: 1 addition & 1 deletion posts/2017/07/05/brew-cask-language-fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Homebrew 1.2.4

## Before

- <https://9renpoto.win/2017/06/22/brew-cask-language/>
- [brew caskにlanguageを指定するらしいけれど](/entry/2017/06/22/brew-cask-language/)
2 changes: 1 addition & 1 deletion posts/2017/08/14/document.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permalink: '/entry/2017/08/14/document/'

## リーダブルコード

- [過去ログ](https://9renpoto.win/2013/02/03/readable-code/)
- [過去ログ](/entry/2013/02/03/readable-code/)
- [`コメントは領域に対する情報の比率が高くなければならない`](https://gist.github.com/AKB428/b8970cea987577ec93c2#%E7%AC%AC%EF%BC%96%E5%B1%A4-%E3%82%B3%E3%83%A1%E3%83%B3%E3%83%88%E3%81%AF%E6%AD%A3%E7%A2%BA%E3%81%A7%E7%B0%A1%E6%BD%94%E3%81%AB)

## 自分の考え
Expand Down
8 changes: 4 additions & 4 deletions posts/2018/12/31/2018-end.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: '2018年 仕事終わり'

# TL;DR

[![image](/_rjyhayX.jpg)](https://twitter.com/9renpoto/status/1075281116548849664)
[![image](/_rjyhayX.jpg)](https://x.com/9renpoto/status/1075281116548849664)

- [findy-code](https://findy-code.io/)で 25 位だったそうです
- 偏差値は高くないです
Expand Down Expand Up @@ -57,7 +57,7 @@ public の数は同数ほどです。

## 来年

- [無職でした](https://9renpoto.win/2018/10/31/goodbye/)が、年明けより新しいお仕事をいただくことなりました
- [無職でした](/entry/2018/10/31/goodbye/)が、年明けより新しいお仕事をいただくことなりました
- たくさんのお声がけを頂きました。誠にありがとうございます
- 今回は前回よりもたくさんの方や会社のお話を聞くことができました
- とりあえず、まだフリーランスを継続することになりましたので、確定申告がんばります
Expand All @@ -66,5 +66,5 @@ public の数は同数ほどです。

## 過去

- [2017 年終わり](https://9renpoto.win/2017/12/31/2017-end/)
- [2016 年終わり](https://9renpoto.win/2017/01/01/2016/)
- [2017 年終わり](/entry/2017/12/31/2017-end/)
- [2016 年終わり](/entry/2017/01/01/2016/)
6 changes: 3 additions & 3 deletions posts/2019/12/31/2019-end.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ title: '2019年 仕事終わり'

## 過去

- [2018 年終わり](https://9renpoto.win/2018/12/31/2018-end/)
- [2017 年終わり](https://9renpoto.win/2017/12/31/2017-end/)
- [2016 年終わり](https://9renpoto.win/2017/01/01/2016/)
- [2018 年終わり](/entry/2018/12/31/2018-end/)
- [2017 年終わり](/entry/2017/12/31/2017-end/)
- [2016 年終わり](/entry/2017/01/01/2016/)
14 changes: 7 additions & 7 deletions posts/2020/04/15/whoami.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ title: Who am i
- <https://gist.github.com/9renpoto/a7f7a2a4dead3bf5c95d8898a62e1cec>
- 2019 年
- TypeScript / (P)react / Next.js チョットデキる
([refs](https://9renpoto.win/2019/12/08/next-stack/))
([refs](/entry/2019/12/08/next-stack/))
- TypeScript / Nest.js (express) チョットデキる
([refs](https://9renpoto.win/2019/12/08/next-stack/))
([refs](/entry/2019/12/08/next-stack/))
- 2018 年
- TypeScript / React チョットデキる
([refs](https://9renpoto.win/2018/10/31/goodbye/))
([refs](/entry/2018/10/31/goodbye/))
- Perl / Python / Scala
チョットデキる([refs](https://9renpoto.win/2018/10/31/goodbye/))
チョットデキる([refs](/entry/2018/10/31/goodbye/))

## できないこと

Expand Down Expand Up @@ -62,7 +62,7 @@ title: Who am i

- なりたくないなと思っていたけど、旬を過ぎてそうなってきている
- 成長(コミット数)が止まったら能力衰退が加速していく恐怖(定期)
- <https://9renpoto.win/2018/04/10/works/>
- <https://9renpoto.win/2017/10/24/full-stack-engineer/>
- <https://9renpoto.win/2016/09/05/study-motivation/>
- [エンジニアリングと仕事](/entry/2018/04/10/works/)
- [フルスタックと器用貧乏](/entry/2017/10/24/full-stack-engineer/)
- [勉強を続けること](/entry/2016/09/05/study-motivation/)
- 今までとやり方を変える必要は感じる
2 changes: 1 addition & 1 deletion posts/2020/12/05/join.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ title: CADDi株式会社にJoinしました
今回、会社員としてJoinを決めたわけですが

1. なんだかんだで頑張れば手が届くコンフォートゾーンを抜けて己の力を試す
1. [もう1つ以上、別の尖った技術スタックがほしい](https://9renpoto.win/2020/04/15/whoami/)
1. [もう1つ以上、別の尖った技術スタックがほしい](/entry/2020/04/15/whoami/)
1. [つくる人を増やす](https://www.kayac.com/vision/vision)ために技術を使いたい

といったことにフォーカスしてしばらくコミットしたいと思います。
Expand Down
10 changes: 5 additions & 5 deletions posts/2023/12/31/end.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ snippet: Next year, a second life will begin

## 来年

- [地方移住に挑戦](https://9renpoto.win/entry/2023/09/09/migration-plan)
- [地方移住に挑戦](/entry/2023/09/09/migration-plan)
- 移住しても月1程度は東京近辺に行けそうです
- 転職に興味のある方、ぜひオンライン・オフラインどちらも構いませんので雑談しましょう
- ウェブ屋からアプリ屋に
Expand All @@ -36,7 +36,7 @@ snippet: Next year, a second life will begin

## 過去

- [2019 年終わり](https://9renpoto.win/2019/12/31/)
- [2018 年終わり](https://9renpoto.win/2018/12/31/2018-end/)
- [2017 年終わり](https://9renpoto.win/2017/12/31/2017-end/)
- [2016 年終わり](https://9renpoto.win/2017/01/01/2016/)
- [2019 年終わり](/entry/2019/12/31/)
- [2018 年終わり](/entry/2018/12/31/2018-end/)
- [2017 年終わり](/entry/2017/12/31/2017-end/)
- [2016 年終わり](/entry/2017/01/01/2016/)

0 comments on commit 0802bf4

Please sign in to comment.