Skip to content

Commit

Permalink
fix: prototypeを表すのに # を使わないようにする (#1382)
Browse files Browse the repository at this point in the history
# は ES2022で構文として使われるため、#をprototypeの短縮語として使わないように変更

## 基本ルール


- セクションタイトル: 
  - 正式名称の 「`Array.prototype.includes` メソッド 」を使う
- 文中
  - prototoypeメソッドは、「Arrayの`includes`メソッド」を使う
  - 静的メソッドの場合は、「 `Array.from` 静的メソッド 」と言うことで区別する
  - プロパティの場合は、「Objectの `a` プロパティ」という表現
  - ~Class Fieldは `メンバー` と呼ぶ感じで、プロパティと区別~ まだ未定
- 例外
  - CSSセレクタでのID指定: `div#result` はlintのオプションで例外としてる
  • Loading branch information
azu committed Feb 6, 2022
1 parent 4e35a1f commit 4977913
Show file tree
Hide file tree
Showing 23 changed files with 478 additions and 211 deletions.
6 changes: 6 additions & 0 deletions .textlintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ module.exports = {
},
"no-use-column": true,
"footnote-order": true,
"no-use-prototype-hash": {
"allow": [
// CSSセレクタの表現であるため許可
"div#result"
]
},
"@textlint-rule/require-header-id": true,
// 箇条書きには。を付けない
"period-in-list-item": {
Expand Down
165 changes: 165 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
"textlint-rule-no-dead-link": "^4.8.0",
"textlint-rule-no-js-function-paren": "^1.0.1",
"textlint-rule-no-use-column": "file:./textlint/textlint-rule-no-use-column",
"textlint-rule-no-use-prototype-hash": "file:./textlint/textlint-rule-no-use-prototype-hash",
"textlint-rule-period-in-list-item": "^0.3.2",
"textlint-rule-preset-ja-technical-writing": "^7.0.0",
"textlint-rule-prh": "^5.3.0",
Expand Down
Loading

0 comments on commit 4977913

Please sign in to comment.