Skip to content
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

feat(option): add new option "allow" #11

Merged
merged 2 commits into from
Jun 14, 2016

Conversation

takahashim
Copy link
Contributor

先ほどはmergeありがとうございました。
こちらが本題で、「AやBや」「AもBも」等を許すためにallowed_joshiというオプションを.textlintrcに追加するものです。
allowed_joshiという名前はあまり分かりやすくないような気もするので、なにか分かりやすい命名があれば変更した方がよいかもしれません(ignored / excluded / skip 等…?)

@azu
Copy link
Member

azu commented Jun 14, 2016

基本的にはESLintのやり方を真似るのが分かりやすいかなと思います。
確か同じような例外オプションがあるルールがあった気がするので調べてみます。
後はキャメルケースの方が見慣れる感じはありますね。

@azu
Copy link
Member

azu commented Jun 14, 2016

ESLintもばらけているとメンテナーの人に教えてもらいました…

が基本的には "allow": 配列 というパターンが多いようです。

http://eslint.org/docs/rules/no-empty-function
http://eslint.org/docs/rules/no-console

(今のところ)ユーザーが手入力するオプション名なので、できるだけ簡潔にした方がtypoとかが減っていいと思うので、joshi というわかりにくい名前も外してallowだけでいいと思います。

"allow": []

助詞以外にもallowするパターンが出てきてしまったら破綻しますが、その場合はルールが単一責任以外のことをやっているという裏返しになっていると思います

@takahashim
Copy link
Contributor Author

なるほどです。allowにしてみました。
squashした方がよいですか?

@azu
Copy link
Member

azu commented Jun 14, 2016

merge時にsquash出来るので気にしなくて大丈夫ですー

@azu azu merged commit b22399b into textlint-ja:master Jun 14, 2016
@azu
Copy link
Member

azu commented Jun 14, 2016

3.3.0としてリリースしました。

@takahashim takahashim deleted the allowed-joshi branch June 14, 2016 04:55
@takahashim
Copy link
Contributor Author

ありがとうございます!

@azu azu changed the title feat(option): add new option allowed_joshi feat(option): add new option "allow" Sep 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants