Skip to content

Setup textlint preset-ja-technical-writing #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 4 additions & 2 deletions qiita/public/069c21328bbeb25d5aab.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

## これはなに

Pulumi の新規 Project 作成に関して公式ドキュメントでは、AWS, Google Cloud, Azure, Kubernetes を管理する前提となっており、 `pulumi new aws-typescript`, `pulumi new azure-typescript`と記述されている。

Check failure on line 17 in qiita/public/069c21328bbeb25d5aab.md

View workflow job for this annotation

GitHub Actions / textlint

This sentence exceeds the maximum count of comma. Maximum is 3
複数クラウドを管理したい場合や、クラウドを管理する目的以外に Pulumi を利用する場合、余計な設定など含まれてしまうため以下のように作成しているのでメモです。

## Pulumi CLI のインストール
Expand All @@ -41,15 +41,15 @@

## 使用する 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 All @@ -72,9 +72,11 @@

### yarn を利用する場合

<!-- textlint-disable ja-technical-writing/ja-no-mixed-period -->
:::note warn
GitHub 等で公開されている Project template から Project を作成する場合は Project 側の設定に従ってください。
:::
<!-- textlint-enable ja-technical-writing/ja-no-mixed-period -->

```bash
PULUMI_EXPERIMENTAL=true pulumi new typescript
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
60 changes: 30 additions & 30 deletions qiita/public/0ac39e8792a476393b6c.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ ignorePublish: false
---

[Ateam Lifestyle Advent Calendar 2019](https://qiita.com/advent-calendar/2019/ateam-lifestyle)の 19 日目は
株式会社エイチームライフスタイル 自動車事業部 の @mziyut が担当します :santa:
株式会社エイチームライフスタイル 自動車事業部 の @mziyut が担当します :santa:

最近購入したテレビが 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,21 +103,21 @@ npx react-native init react_native_androidtv

### 起動

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

```sh
$ cd /Users/mziyut/Workspace/github.com/mziyut/react_native_androidtv && npx react-native run-android
```

起動することを確認できました :tada:
起動することを確認できました :tada:

<img width="300" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/55950/7f892fdc-83c2-428a-3828-5e763b01e35a.png">

### 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,25 +175,25 @@ $ 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 -->

## 最後に

[Ateam Lifestyle Advent Calendar 2019](https://qiita.com/advent-calendar/2019/ateam-lifestyle) 20 日目は @mgmg121 がお送りします!!
[Ateam Lifestyle Advent Calendar 2019](https://qiita.com/advent-calendar/2019/ateam-lifestyle) 20 日目は @mgmg121 がお送りします
どんな記事を書いてくれるかとても楽しみですね!

## 参考
Expand Down
2 changes: 1 addition & 1 deletion qiita/public/0d752d36e00c8b130d9e.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ignorePublish: false

## はじめに

Slack の Workspace は気軽に作成できる反面、個人用、家族用、....等様々存在する誤家庭も少なくないと思います
Slack の Workspace は気軽に作成できる反面、個人用、家族用、....等様々存在する誤家庭も少なくありません
それぞれの設定はもちろん大変ですが、今回挙げる emoji が特に面倒です。
Import は Google Chrome の拡張に任せればすぐ終わりますが、 export はそうも行きません。
また過去書かれた記事は、仕様変更等で動かなくなってしまったものも多く、記事にまとめることにしました。
Expand Down
Loading
Loading