Skip to content

Commit adbe3c1

Browse files
committed
initial commit
0 parents  commit adbe3c1

11 files changed

+495
-0
lines changed

.babelrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"presets": [
3+
"es2015"
4+
],
5+
"env": {
6+
"development": {
7+
"presets": [
8+
"jsdoc-to-assert",
9+
"power-assert"
10+
]
11+
}
12+
}
13+
}

.gitignore

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
### https://raw.github.com/github/gitignore/608690d6b9a78c2a003affc792e49a84905b3118/Node.gitignore
2+
3+
# Logs
4+
logs
5+
*.log
6+
7+
# Runtime data
8+
pids
9+
*.pid
10+
*.seed
11+
12+
# Directory for instrumented libs generated by jscoverage/JSCover
13+
lib-cov
14+
15+
# Coverage directory used by tools like istanbul
16+
coverage
17+
18+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
19+
.grunt
20+
21+
# node-waf configuration
22+
.lock-wscript
23+
24+
# Compiled binary addons (http://nodejs.org/api/addons.html)
25+
build/Release
26+
27+
# Dependency directory
28+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
29+
node_modules
30+
31+
# Debug log from npm
32+
npm-debug.log
33+
34+
35+
### https://raw.github.com/github/gitignore/608690d6b9a78c2a003affc792e49a84905b3118/Global/JetBrains.gitignore
36+
37+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
38+
39+
*.iml
40+
41+
## Directory-based project format:
42+
.idea/
43+
# if you remove the above rule, at least ignore the following:
44+
45+
# User-specific stuff:
46+
# .idea/workspace.xml
47+
# .idea/tasks.xml
48+
# .idea/dictionaries
49+
50+
# Sensitive or high-churn files:
51+
# .idea/dataSources.ids
52+
# .idea/dataSources.xml
53+
# .idea/sqlDataSources.xml
54+
# .idea/dynamic.xml
55+
# .idea/uiDesigner.xml
56+
57+
# Gradle:
58+
# .idea/gradle.xml
59+
# .idea/libraries
60+
61+
# Mongo Explorer plugin:
62+
# .idea/mongoSettings.xml
63+
64+
## File-based project format:
65+
*.ipr
66+
*.iws
67+
68+
## Plugin-specific files:
69+
70+
# IntelliJ
71+
out/
72+
73+
# mpeltonen/sbt-idea plugin
74+
.idea_modules/
75+
76+
# JIRA plugin
77+
atlassian-ide-plugin.xml
78+
79+
# Crashlytics plugin (for Android Studio and IntelliJ)
80+
com_crashlytics_export_strings.xml
81+
crashlytics.properties
82+
crashlytics-build.properties

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sudo: false
2+
language: node_js
3+
node_js: "stable"

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2016 azu
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

README.md

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
# textlint-rule-preset-ja-technical-writing
2+
3+
技術文書向けの[textlint](https://textlint.github.io/)ルールプリセットです。
4+
5+
## Install
6+
7+
Install with [npm](https://www.npmjs.com/):
8+
9+
npm install textlint-rule-preset-ja-technical-writing
10+
11+
## Usage
12+
13+
Via `.textlintrc`(Recommended)
14+
15+
```json
16+
{
17+
"rules": {
18+
"preset-ja-technical-writing": true
19+
}
20+
}
21+
```
22+
23+
Via CLI
24+
25+
```
26+
textlint --preset ja-technical-writing README.md
27+
```
28+
29+
## ルール一覧
30+
31+
- 1文の長さは90文字以下とする
32+
- https://github.com/azu/textlint-rule-sentence-length
33+
34+
"sentence-length": {
35+
max: 90
36+
},
37+
38+
- コンマは1文中に3つまで
39+
- https://github.com/azu/textlint-rule-max-comma
40+
41+
"max-comma": {
42+
max: 3
43+
},
44+
45+
- 読点は1文中に3つまで
46+
- https://github.com/azu/textlint-rule-max-ten
47+
48+
"max-ten": {
49+
max: 3
50+
},
51+
52+
- 連続できる最大の漢字長は5文字まで
53+
- 6文字以上の漢字は使用しない
54+
- https://github.com/azu/textlint-rule-max-kanji-continuous-len
55+
56+
"max-kanji-continuous-len": {
57+
max: 5
58+
},
59+
60+
- 数量を表現し、数を数えられるものは算用数字を使用します。
61+
- 任意の数に置き換えても通用する語句がこれに該当します。序数詞(「第~回」「~番目」「~回目」)も算用数字を使います。
62+
- 慣用的表現、熟語、概数、固有名詞、副詞など、漢数字を使用することが一般的な語句では漢数字を使います。
63+
- https://github.com/azu/textlint-rule-preset-JTF-style
64+
- https://www.jtf.jp/jp/style_guide/styleguide_top.html
65+
66+
"arabic-kanji-numbers": true,
67+
68+
- 「ですます調」、「である調」を統一します
69+
- 見出しは自動
70+
- 本文はですます調
71+
- 箇条書きはである調
72+
- https://github.com/azu/textlint-rule-no-mix-dearu-desumasu
73+
74+
"no-mix-dearu-desumasu": {
75+
"preferInHeader": "",
76+
"preferInBody": "ですます",
77+
"preferInList": "である",
78+
"strict": true
79+
},
80+
81+
- 文末には句点記号として。を使います
82+
- https://github.com/textlint-ja/textlint-rule-ja-no-mixed-period
83+
84+
"ja-no-mixed-period": {
85+
"periodMark": "。"
86+
},
87+
88+
- 二重否定は使用しない
89+
- https://github.com/azu/textlint-rule-no-double-negative-ja
90+
91+
"no-double-negative-ja": true,
92+
93+
- ら抜き言葉を使用しない
94+
- https://github.com/azu/textlint-rule-no-dropping-the-ra
95+
96+
"no-dropping-the-ra": true,
97+
98+
- 同じ表現から文を開始しすぎない
99+
- https://github.com/azu/textlint-rule-no-start-duplicated-conjunction
100+
101+
"no-start-duplicated-conjunction": {
102+
"interval": 2
103+
},
104+
105+
- 同じ接続詞を連続して使用しない
106+
- https://github.com/takahashim/textlint-rule-no-doubled-conjunction
107+
108+
"no-doubled-conjunction": true,
109+
110+
- 同じ助詞を連続して使用しない
111+
112+
"no-doubled-joshi": {
113+
"min_interval": 1
114+
},
115+
116+
- 感嘆符!!、疑問符??を使用しない
117+
- https://github.com/azu/textlint-rule-no-exclamation-question-mark
118+
119+
"no-exclamation-question-mark": true,
120+
121+
- 半角カナを使用しない
122+
- https://github.com/azu/textlint-rule-no-hankaku-kana
123+
124+
"no-hankaku-kana": true,
125+
126+
- 〜かもしれない 等の弱い日本語表現の利用を使用しない
127+
- https://github.com/textlint-ja/textlint-rule-ja-no-weak-phrase
128+
129+
"ja-no-weak-phrase": true,
130+
131+
- 同一の単語を間違えて連続しているのをチェックする
132+
- https://github.com/textlint-ja/textlint-rule-ja-no-successive-word
133+
134+
"ja-no-successive-word": true,
135+
136+
- よくある日本語の誤用をチェックする
137+
- https://github.com/textlint-ja/textlint-rule-ja-no-abusage
138+
139+
"ja-no-abusage": true
140+
141+
## Changelog
142+
143+
See [Releases page](https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing/releases).
144+
145+
## Semantic Versioning Policy
146+
147+
次のルールでバージョンが更新されます。
148+
149+
- Patch リリース
150+
- 各ルールのバグ修正 (警告を減らす方向への修正)
151+
- ドキュメントの改善
152+
- 内部的な変更 (リファクタリングやテストの改善など)
153+
- リリース失敗時の再リリース
154+
- Minor リリース
155+
- 各ルールのバグ修正 (警告を増やす方向への修正)
156+
- 新オプションの追加
157+
- 既存ルールの非推奨化
158+
- Major リリース
159+
- プリセットへのルールの追加
160+
- プリセットからルールの削除
161+
162+
163+
更新内容は[Releases page](https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing/releases)を参照してください。
164+
165+
## Running tests
166+
167+
Install devDependencies and Run `npm test`:
168+
169+
npm i -d && npm test
170+
171+
## Contributing
172+
173+
Pull requests and stars are always welcome.
174+
175+
For bugs and feature requests, [please create an issue](https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing/issues).
176+
177+
1. Fork it
178+
2. Create your feature branch: `git checkout -b my-new-feature`
179+
3. Commit your changes: `git commit -am 'Add some feature'`
180+
4. Push to the branch: `git push origin my-new-feature`
181+
5. Submit a pull request :D
182+
183+
## Author
184+
185+
- [github/azu](https://github.com/azu)
186+
- [twitter/azu_re](https://twitter.com/azu_re)
187+
188+
## License
189+
190+
MIT © azu

example/.textlintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"rules": {
3+
"preset-ja-technical-writing": true
4+
}
5+
}

example/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"private": true,
3+
"scripts": {
4+
"pretest": "npm rm textlint-rule-preset-ja-technical-writing && npm i",
5+
"textlint": "textlint ../README.md",
6+
"test": "npm run textlint"
7+
},
8+
"devDependencies": {
9+
"textlint": "^7.0.1",
10+
"textlint-rule-preset-ja-technical-writing": "file:../"
11+
}
12+
}

0 commit comments

Comments
 (0)