Skip to content

refactor(textlint): update JTF style plugin #82

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

Merged
merged 3 commits into from
Oct 11, 2015
Merged
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
6 changes: 5 additions & 1 deletion .textlintrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
"rulePaths": [
"test/prh-rule.yaml"
]
}
},
"jtf-style/2.1.5.カタカナ": false,
"jtf-style/2.1.6.カタカナの長音": false,
"jtf-style/4.2.2.疑問符(?)": false,
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

疑問符はやや一時的なものかも?
癖で?を打つことあるので、見た目はどっちが良いんだろ?

"jtf-style/4.3.1.丸かっこ()": false
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(丸かっこを全角にするべきかどうかはちょっと微妙。)
(ウェブだとどっちでもよいような気がする)

}
}
2 changes: 1 addition & 1 deletion ja/ESLint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ESLintサイト上には、上記のように書かれていることからも
## どう書ける?

ESLintでは`.eslintrc`という設定ファイルに利用するルールの設定をして使うため、
実行方法についてはドキュメントを参照して下さい
実行方法についてはドキュメントを参照してください

- [Documentation - ESLint - Pluggable JavaScript linter](http://eslint.org/docs/user-guide/configuring "Documentation - ESLint - Pluggable JavaScript linter")

Expand Down
8 changes: 4 additions & 4 deletions ja/connect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> この文章は[Connect](https://github.com/senchalabs/connect "Connect") 3.4.0を元に書かれています。

[Connect](https://github.com/senchalabs/connect "Connect")はNode.jsで動くHTTPサーバフレームワークです
[Connect](https://github.com/senchalabs/connect "Connect")はNode.jsで動くHTTPサーバーフレームワークです
_middleware_という拡張する仕組みを持っていて、Connectが持つ機能自体はとても少ないです。

この章ではConnectの_middleware_の仕組みについて見て行きましょう。
Expand All @@ -23,7 +23,7 @@ Echoサーバとは、送られてきたリクエストの内容をそのまま
```

`app.use(middleware)` という形で、_middleware_と呼ばれる関数には`request`や`response`といったオブジェクトが渡されます。
この`request`や`response`を_middleware_で処理することでログを取ったり、任意のレスポンスを返したり出来るようになっています
この`request`や`response`を_middleware_で処理することでログを取ったり、任意のレスポンスを返したりできるようになっています

Echoサーバでは `req.pipe(res);` という形でリクエストをそのままレスポンスとして流す事で実現されています。

Expand Down Expand Up @@ -73,7 +73,7 @@ Connectが登録された_middleware_をどう処理するかというと、

エラーハンドリングの_middleware_は処理中にエラーが起きた時のみ呼ばれます。

そのため、通常は [nosniff.js](#nosniff.js) -> [hello.js](#hello.js) の順で呼び出されます。
そのため、通常は [nosniff.js](#nosniff.js) [hello.js](#hello.js) の順で呼び出されます。

[import nosniff.js](../../src/connect/nosniff.js)

Expand Down Expand Up @@ -194,7 +194,7 @@ Connect自体の機能は少ないため、その分_middleware_が多くある

ここではConnectのプラグインアーキテクチャについて学びました。

- Connectは_middleware_を使ったHTTPサーバライブラリである
- Connectは_middleware_を使ったHTTPサーバーライブラリである
- Connect自体は機能は少ない
- 複数の_middleware_を組み合わせてアプリケーションを作ることができる

Expand Down
6 changes: 3 additions & 3 deletions ja/gulp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ gulp.task("sass", function() {
});
```

ここでは、gulpプラグインの仕組みについて扱うので、gulpの使い方については詳しくは以下を参照して下さい
ここでは、gulpプラグインの仕組みについて扱うので、gulpの使い方については詳しくは以下を参照してください

- [gulp/docs at master · gulpjs/gulp](https://github.com/gulpjs/gulp/tree/master/docs)
- [現場で使えるgulp入門 - gulpとは何か | CodeGrid](https://app.codegrid.net/entry/gulp-1)
Expand Down Expand Up @@ -114,7 +114,7 @@ Transform Streamというものが出てきましたが、Node.jsのStreamは次

1. `./*.*`にマッチするファイルを取得 = Readable Stream
2. 取得したファイルの先頭に"prefix text"という文字列を追加する = Transform Stream
3. 変更したファイルを`build/`ディレクトリに出力する = Writable Stream
3. 変更したファイルを `build/` ディレクトリに出力する = Writable Stream

あるファイルを _Read_ して、 _Transform_ したものを、別のところに _Write_ としているというよくあるデータの流れと言えます。

Expand All @@ -124,7 +124,7 @@ Transform Streamというものが出てきましたが、Node.jsのStreamは次
「gulpから流れてきたデータ」を扱うために`readableObjectMode`と`writableObjectMode`をそれぞれ`true`にしています。
この _ObjectMode_ というのは名前の通り、Streamでオブジェクトを流すための設定です。

通常のNode.js Streamは[Buffer](https://nodejs.org/api/buffer.html "Buffer")というバイナリデータを扱います
通常のNode.js Streamは[Buffer](https://nodejs.org/api/buffer.html "Buffer")というバイナリーデータを扱います
この[Buffer](https://nodejs.org/api/buffer.html "Buffer")はStringと相互変換が可能ですが、複数の値を持ったオブジェクトのようなものは扱えません。

そのため、Node.js Streamには[Object Mode](https://nodejs.org/api/stream.html#stream_object_mode "Object Mode")があり、これが有効の場合はBufferやString以外のJavaScriptオブジェクトをStreamで流せるようになっています。
Expand Down
2 changes: 1 addition & 1 deletion ja/jQuery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ calculator.fn = calculator.prototype;

実装をみてもらうと分かりますが、JavaScriptの`prototype`の仕組みをそのまま利用しています。
そのため、特別な実装は必要なく
「拡張する時は`calculator.prototype`の代わりに`calculator.fn`を拡張して下さい
「拡張する時は`calculator.prototype`の代わりに`calculator.fn`を拡張してください
というルールがあるだけとも言えます。

## エコシステム
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"npm-run-all": "^1.2.8",
"power-assert": "^1.0.0",
"textlint": "^3.7.1",
"textlint-plugin-jtf-style": "^0.1.9",
"textlint-plugin-jtf-style": "^0.6.0",
"textlint-rule-max-ten": "^1.1.0",
"textlint-rule-no-mix-dearu-desumasu": "^1.1.0",
"textlint-rule-no-start-duplicated-conjunction": "^1.0.3",
Expand Down