Skip to content

Commit

Permalink
Add textlint rule preset-ja-technical-writing
Browse files Browse the repository at this point in the history
  • Loading branch information
mziyut committed Jun 24, 2024
1 parent 9ff0af4 commit 5bfc68f
Show file tree
Hide file tree
Showing 59 changed files with 1,398 additions and 564 deletions.
3 changes: 2 additions & 1 deletion qiita/.textlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"aws-service-name": true,
"no-mixed-zenkaku-and-hankaku-alphabet": true,
"no-todo": true,
"period-in-list-item": true
"period-in-list-item": true,
"preset-ja-technical-writing": true
}
}
3 changes: 2 additions & 1 deletion qiita/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"textlint-rule-aws-service-name": "^1.10.1",
"textlint-rule-no-mixed-zenkaku-and-hankaku-alphabet": "^1.0.1",
"textlint-rule-no-todo": "^2.0.1",
"textlint-rule-period-in-list-item": "^1.0.1"
"textlint-rule-period-in-list-item": "^1.0.1",
"textlint-rule-preset-ja-technical-writing": "^8.0.0"
},
"prettier": {
"singleQuote": true
Expand Down
8 changes: 4 additions & 4 deletions qiita/public/049df55f5ad16c81aa6f.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ignorePublish: false
## はじめに

Public preview 中の AWS Native Package の初期設定方法について本記事にまとめました。
AWS Native Package については ▼ 記事を参照してみてください
AWS Native Package については ▼ 記事を参照してみてください

https://qiita.com/mziyut/items/a9f7f4db167d674a9f3c

Expand All @@ -41,7 +41,7 @@ v16.10.0

## AWS Native Package を追加

`yarn add @pulumi/aws-native` を実行し `aws-native` package を追加します
`yarn add @pulumi/aws-native` を実行し `aws-native` package を追加します

```zsh
yarn add @pulumi/aws-native
Expand All @@ -50,7 +50,7 @@ yarn add @pulumi/aws-native
## region を設定する

AWS Native Package も AWS Classic と同様に region の設定を行う必要があります。
今回は、東京リージョン `ap-northeast-1` を設定します
今回は、東京リージョン `ap-northeast-1` を設定します

```zsh
pulumi config set aws-native:region ap-northeast-1
Expand All @@ -61,7 +61,7 @@ pulumi config set aws-native:region ap-northeast-1
AWS のリソースを操作するため 対象のアカウントにアクセスできる権限を付与します。
`access_key``assumeRole` などサポートしていますが今回は、シンプルに `access_key` を発行して検証します。

IAM の作成や `access_key` の発行がわからない方は以下ドキュメントを参考に作成してください
IAM の作成や `access_key` の発行がわからない方は以下ドキュメントを参考に作成してください

https://docs.aws.amazon.com/ja_jp/IAM/latest/UserGuide/id_users_create.html

Expand Down
24 changes: 12 additions & 12 deletions qiita/public/05e35977ef44de030d9d.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ ignorePublish: false

## はじめに

タイトルの通り、 Neovim で Rust を快適にかけるような環境を整えたので、まとめました
タイトルの通り、 Neovim で Rust を快適にかけるような環境を整えたので、まとめました

## 環境

私が利用する環境は以下の通りです。 vim でも同様に設定できるはずですが未確認です :pray:
私が利用する環境は以下の通りです。 vim でも同様に設定できるはずですが未確認です :pray:

- OS
- macOS (Ventura)
Expand All @@ -31,7 +31,7 @@ ignorePublish: false
- Plugin
- coc.nvim

既に "vim-plug" や "coc.nvim" の設定が終わっていることを前提で記載します
既に "vim-plug" や "coc.nvim" の設定が終わっていることを前提で記載します

https://neovim.io/

Expand All @@ -41,19 +41,19 @@ https://github.com/neoclide/coc.nvim

## Plugin "rust.vim" を install する

`.vimrc` 等に "rust.vim" を install するための記述をします
`.vimrc` 等に "rust.vim" を install するための記述をします

```vim
Plug 'rust-lang/rust.vim'
```

`vim-plug` 以外の Plugin manager を利用している場合は、以下 `README.md` を確認してください
`vim-plug` 以外の Plugin manager を利用している場合は、以下 `README.md` を確認してください

https://github.com/rust-lang/rust.vim

## Language server を設定する

macOS で Homebrew を利用している場合は以下コマンドを実行するだけで `rust-analyzer` を install 出来ます
macOS で Homebrew を利用している場合は以下コマンドを実行するだけで `rust-analyzer` を install 出来ます

```sh
brew install rust-analyzer
Expand All @@ -67,30 +67,30 @@ https://rust-analyzer.github.io

## coc-rust-analyzer を install する

nvim を起動し、 coc-rust-analyzer を install します
nvim を起動し、 coc-rust-analyzer を install します

```vim
:CocInstall coc-rust-analyzer
```

私は、 coc.nvim の extension を `.vimrc` 内で管理していたため以下のように記述しています
私は、 coc.nvim の extension を `.vimrc` 内で管理していたため以下のように記述しています

```vim
let g:coc_global_extensions = ['coc-rust-analyzer']
```

設定を追記したら `:CocInstall` を実行しましょう
設定を追記したら `:CocInstall` を実行しましょう

https://github.com/fannheyward/coc-rust-analyzer

適当な `.rs` ファイルを開き意図した設定が動いているか確認しましょう
適当な `.rs` ファイルを開き意図した設定が動いているか確認しましょう

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/55950/41ad6fac-85ea-4a9d-e38d-28017cd17791.png)

## 最後に

Neovim (vim-plug + coc.nvim) で Rust の開発環境を作りました
まだ、 Rust を書き始めたばかりなのでより良い設定があれば変更するかもしれません
Neovim (vim-plug + coc.nvim) で Rust の開発環境を作りました
まだ、 Rust を書き始めたばかりなのでより良い設定があれば変更するかもしれません

## References

Expand Down
4 changes: 2 additions & 2 deletions qiita/public/069c21328bbeb25d5aab.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ mkdir pulumi && cd pulumi

## 使用する Node のバージョンを固定

`nodenv local` を実行し `.node-version` を作成します
`nodenv local` を実行し `.node-version` を作成します

```bash
nodenv local 16.3.0
```

### 今後セットアップに yarn を利用する場合

以下コマンドを実行し `yarn` を install してください
以下コマンドを実行し `yarn` を install してください

```bash
npm i -g yarn
Expand Down
24 changes: 12 additions & 12 deletions qiita/public/096bf6bfda4bc46083d1.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ ignorePublish: false

## はじめに

- GitHub Actions の "actions/cache" で作成した cache を GitHub CLI で削除する 方法についてまとめました
GitHub Actions の "actions/cache" で作成した cache を GitHub CLI で削除する 方法についてまとめました

## 事前準備

- この方法は GitHub CLI が使える前提です。使えない場合は設定するか、 "curl" で実行したい人は docs を参照してください
この方法は GitHub CLI が使える前提です。使えない場合は設定するか、 "curl" で実行したい人は docs を参照してください

https://docs.github.com/en/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id

## cache を削除する

### Cache Key を取得する

GitHub Actions の実行結果を確認し、Cache Key を取得します
GitHub Actions の実行結果を確認し、Cache Key を取得します

以下のような Log が出力されている箇所を探します
多く場合 `Run actions/cache@v2``Post Run actions/cache@v2` 等といった Job 内から探すことが出来ます
以下のような Log が出力されている箇所を探します
多く場合 `Run actions/cache@v2``Post Run actions/cache@v2` 等といった Job 内から探すことが出来ます

```sh:Run actions/cache@v2
Received XXXXXX of XXXXXX (100.0%), 156.5 MBs/sec
Expand All @@ -47,22 +47,22 @@ Cache saved successfully
Cache restored from key: Linux-xxxx-xxxx-xxxx-cache-all-2704376682
```

上記ログであれば、 Cache kye は `Linux-xxxx-xxxx-xxxx-cache-all-2704376682` が cache key となります
上記ログであれば、 Cache kye は `Linux-xxxx-xxxx-xxxx-cache-all-2704376682` が cache key となります

### Cache を削除する

直前のステップで取得した Cache key を用い Cache を削除します
直前のステップで取得した Cache key を用い Cache を削除します

```sh
gh api --method DELETE -H "Accept: application/vnd.github+json" "/repos/USER_OR_ORG/REPONAME/actions/caches?key=YOUR_CACHE_KEY"
```

`YOUR_CACHE_KEY` 部分を Cache key に置き換えて実行してください
`YOUR_CACHE_KEY` 部分を Cache key に置き換えて実行してください

#### 実行例

実際に Cache を削除してみます
今回は、`mziyut/test-github-actions` repository に作成した cahce を削除しました
実際に Cache を削除してみます
今回は、`mziyut/test-github-actions` repository に作成した cahce を削除しました

```sh
gh api --method DELETE -H "Accept: application/vnd.github+json" "/repos/mziyut/test-github-actions/actions/caches?key=Linux-xxxx-xxxx-xxxx-cache-all-2704376682"
Expand All @@ -82,7 +82,7 @@ gh api --method DELETE -H "Accept: application/vnd.github+json" "/repos/USER_OR_
}
```

削除出来ているか確認するため、同じ cache key に対して再度 cache の削除してみます
削除出来ているか確認するため、同じ cache key に対して再度 cache の削除してみます

```sh
gh api --method DELETE -H "Accept: application/vnd.github+json" "/repos/mziyut/test-github-actions/actions/caches?key=Linux-xxxx-xxxx-xxxx-cache-all-2704376682"
Expand All @@ -93,7 +93,7 @@ gh api --method DELETE -H "Accept: application/vnd.github+json" "/repos/mziyut/t
gh: Not Found (HTTP 404)
```

Cache が存在しないため、 `Not Found (HTTP 404)` が返却されました
Cache が存在しないため、 `Not Found (HTTP 404)` が返却されました

## Reference

Expand Down
54 changes: 27 additions & 27 deletions qiita/public/0ac39e8792a476393b6c.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ ignorePublish: false

最近購入したテレビが AndroidTV をベースにしたものだったのもあり、
0.55 から ReactNative で AndroidTV 向けアプリケーションの開発を行えるようになっていたので試してみました。
ちなみに2019/12/16 時点の最新バージョンはv0.61.5 でした
ちなみに2019/12/16 時点の最新バージョンはv0.61.5 でした

## ReactNative とは :thinking:

簡単に言うと「Facebook が作成した React をベースにネイティブアプリケーションフレームワーク」です。

## AndroidTV とは :thinking:

簡単に言うとGoogle が提供するスマートテレビ向けプラットフォームです
簡単に言うとGoogle が提供するスマートテレビ向けプラットフォームです

## 今回用いる環境

Expand All @@ -45,12 +45,12 @@ v10.16.3

## ReactNative を開発する準備 :construction:

[AndroidStudio](https://developer.android.com/studio/index.html)[CocoaPods](https://cocoapods.org/)などは
プロジェクト作成時に必要となるため事前に準備しておきましょう
[AndroidStudio](https://developer.android.com/studio/index.html)[CocoaPods](https://cocoapods.org/)などは
プロジェクト作成時に必要となるため事前に準備しておきましょう

まずReactNative の Project を作成します
今回は、「react_native_androidtvといったプロジェクト名にします
時間はかかるので気長に待ちましょう
まずReactNative の Project を作成します
今回は、「react_native_androidtvといったプロジェクト名にします
時間はかかるので気長に待ちましょう

```sh
npx react-native init react_native_androidtv
Expand Down Expand Up @@ -103,8 +103,8 @@ npx react-native init react_native_androidtv

### 起動

Blank の Project が作成されたので起動できるところまで確認を実施しておきます
今回は Android が対象なのでProject 作成時に出ていた以下コマンドを実行
Blank の Project が作成されたので起動できるところまで確認を実施しておきます
今回は Android が対象なのでProject 作成時に出ていた以下コマンドを実行

Check warning on line 107 in qiita/public/0ac39e8792a476393b6c.md

View check run for this annotation

Codecov / codecov/patch

qiita/public/0ac39e8792a476393b6c.md#L107

Added line #L107 was not covered by tests

```sh
$ cd /Users/mziyut/Workspace/github.com/mziyut/react_native_androidtv && npx react-native run-android
Expand All @@ -116,8 +116,8 @@ $ cd /Users/mziyut/Workspace/github.com/mziyut/react_native_androidtv && npx rea

### AndroidTV 向けにオプションの変更

AndroidTV 向けに Build できるように設定を変更しましょう
`AndroidManifest.xml`の一部を変更する必要があります
AndroidTV 向けに Build できるように設定を変更しましょう
`AndroidManifest.xml`の一部を変更する必要があります

- react_native_androidtv/android/app/src/main/AndroidManifest.xml
[※1](https://facebook.github.io/react-native/docs/building-for-apple-tv)
Expand All @@ -140,30 +140,30 @@ AndroidTV 向けに Build できるように設定を変更しましょう。

### 仮想デバイスの追加

デフォルトだと通常の Android が起動してしまうため AndroidTVDevice を追加しましょう
デフォルトだと通常の Android が起動してしまうため AndroidTVDevice を追加しましょう
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/55950/fb60f6e3-7d0c-0ada-c7cb-3ea2040a76cd.png)

↑ のアイコンを AndroidStudio から探し AVD Managerを立ち上げます
標準であればツールバー内に存在します
↑ のアイコンを AndroidStudio から探し AVD Managerを立ち上げます
標準であればツールバー内に存在します
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/55950/6eae0a85-fae2-1c03-86d9-0493c2c5ee67.png)

Create Virtual Deviseをクリックします
Create Virtual Deviseをクリックします

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/55950/e8970aa0-1146-8771-627e-8b8d28e0a23e.png)

AndroidTV を選択しNextをクリック
AndroidTV を選択しNextをクリック

システムイメージを選択しましょう
今回は、「Q」を選択します
システムイメージを選択しましょう
今回は、「Q」を選択します
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/55950/ef8a8de8-8e07-1162-b073-cf39807157d0.png)

Nextを押すと無事仮想デバイスが作成されます
Nextを押すと無事仮想デバイスが作成されます

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/55950/91b906dd-8b29-f9d1-6315-f392d38365e0.png)

### 起動しましょう :clap:

先程立ち上がっていた仮想デバイスを停止した後改めて Build を行います
先程立ち上がっていた仮想デバイスを停止した後改めて Build を行います

```sh
$ cd /Users/mziyut/Workspace/github.com/mziyut/react_native_androidtv && npx react-native run-android
Expand All @@ -175,19 +175,19 @@ $ cd /Users/mziyut/Workspace/github.com/mziyut/react_native_androidtv && npx rea

<!-- textlint-disable @textlint-ja/no-synonyms -->

AndroidTV 向けの Build が ReactNative でサポートされており少ない設定でアプリケーションを Build し立ち上げるところまで行えました
しかし[TV アプリの品質  |  Android Developers](https://developer.android.com/docs/quality-guidelines/tv-app-quality)に以下記載があります
AndroidTV 向けの Build が ReactNative でサポートされており少ない設定でアプリケーションを Build し立ち上げるところまで行えました
しかし[TV アプリの品質  |  Android Developers](https://developer.android.com/docs/quality-guidelines/tv-app-quality)に以下記載があります

> 重要: 優れたユーザー エクスペリエンスを実現するには、TV 端末向けのアプリがユーザビリティの特定の要件に適合している必要があります。
> 次の品質基準に適合するアプリのみが Google Play で Android TV アプリとして認められます。
リモコン操作に対する設定だけではなく UI に関する制限をクリアするために多くの実装を追加で行う必要があります
(同様にAppleTV 向けアプリケーションも同様に要件があります)
リモコン操作に対する設定だけではなく UI に関する制限をクリアするために多くの実装を追加で行う必要があります
(同様にAppleTV 向けアプリケーションも同様に要件があります)

そのためReactNative でスマートテレビ向けアプリケーションを作成できると安易に飛びつくことなく
実装に必要な内容を整理した上で判断したほうが良いと考えます
そのためReactNative でスマートテレビ向けアプリケーションを作成できると安易に飛びつくことなく
実装に必要な内容を整理した上で判断したほうが良いと考えます

Build しただけですが[mziyut/react_native_androidtv - Github](https://github.com/mziyut/react_native_androidtv)に Push しておきました
Build しただけですが[mziyut/react_native_androidtv - Github](https://github.com/mziyut/react_native_androidtv)に Push しておきました

<!-- textlint-enable @textlint-ja/no-synonyms -->

Expand Down
2 changes: 1 addition & 1 deletion qiita/public/0f4109c425165f5011df.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ https://github.com/hashicorp/terraform/issues/27264#issuecomment-743389837

## 実行環境の追加

私は `terraform init` 実行時に差分が生じ今回の事象に気づきましたが、実行環境の追加が予め予定されている場合、以下コマンドで実行予定のプラットフォームを追加することができます
私は `terraform init` 実行時に差分が生じ今回の事象に気づきましたが、実行環境の追加が予め予定されている場合、以下コマンドで実行予定のプラットフォームを追加できます

Check warning on line 59 in qiita/public/0f4109c425165f5011df.md

View check run for this annotation

Codecov / codecov/patch

qiita/public/0f4109c425165f5011df.md#L59

Added line #L59 was not covered by tests

下記は、 `darwin_arm64` 環境での実行を予定している場合の例

Expand Down
4 changes: 2 additions & 2 deletions qiita/public/122c789bac1ffadbc973.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ https://github.com/hashicorp/packer/issues/10728#issuecomment-793199077

### Before

下記のように定義された JSON ファイルに対して `packer hcl2_upgrade` を実行すると...
下記のように定義された JSON ファイルに対して `packer hcl2_upgrade` を実行すると..

```json:sample_packer_template.json
{
Expand All @@ -53,7 +53,7 @@ source "amazon-ebs" "autogenerated_1" {

### After

記述を変更し `packer hcl2_upgrade` を実行すると...
記述を変更し `packer hcl2_upgrade` を実行すると..

```json:sample_packer_template.json
{
Expand Down
2 changes: 1 addition & 1 deletion qiita/public/238dbd6c0cfdc8600ef5.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ https://bugs.ruby-lang.org/issues/17837
https://github.com/ruby/ruby/pull/5703

`Regexp.timeout=` は Ruby 3.2 から利用出来るようになった global な設定です
`Regexp.timeout=` を設定する方法は 2 種類あり、 global に適用指定場合は `Regexp.timeout=` のように記述し、 特定の条件の下のみ timeout を `Regexp.new(/^(a|a)*$/, timeout: 1.0)` のようにも設定することができます
`Regexp.timeout=` を設定する方法は 2 種類あり、 global に適用指定場合は `Regexp.timeout=` のように記述し、 特定の条件の下のみ timeout を `Regexp.new(/^(a|a)*$/, timeout: 1.0)` のようにも設定できます

```ruby
# グローバルに定義したい場合
Expand Down
Loading

0 comments on commit 5bfc68f

Please sign in to comment.