Skip to content

Commit 2d17222

Browse files
committed
init
1 parent 339d64c commit 2d17222

File tree

5 files changed

+652
-1
lines changed

5 files changed

+652
-1
lines changed

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,29 @@
1-
# textlint-rule-preset-vuejs-jp
1+
# textlint-rule-preset-vuejs-jp
2+
3+
Vue.js 日本ユーザーグループで利用するルールプリセットです。
4+
5+
## Install
6+
7+
Install with [npm](https://www.npmjs.com/):
8+
9+
```
10+
npm install git+https://github.com/vuejs-jp/textlint-rule-preset-vuejs-jp.git
11+
```
12+
13+
## Usage
14+
15+
Via `.textlintrc`:
16+
17+
```json
18+
{
19+
"rules": {
20+
"preset-vuejs-jp": true
21+
}
22+
}
23+
```
24+
25+
Via CLI:
26+
27+
```
28+
textlint --preset vuejs-jp README.md
29+
```
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
const { moduleInterop } = require("@textlint/module-interop");
2+
const presetJtfStyle = moduleInterop(require("textlint-rule-preset-jtf-style")).rules;
3+
const presetJaSpacing = moduleInterop(require("textlint-rule-preset-ja-spacing")).rules;
4+
5+
module.exports = {
6+
rules: {
7+
"1.1.1.本文": presetJtfStyle["1.1.1.本文"],
8+
"1.1.2.見出し": presetJtfStyle["1.1.2.見出し"],
9+
"1.1.3.箇条書き": presetJtfStyle["1.1.3.箇条書き"],
10+
"1.1.5.図表のキャプション": presetJtfStyle["1.1.5.図表のキャプション"],
11+
"1.2.1.句点(。)と読点(、)": presetJtfStyle["1.2.1.句点(。)と読点(、)"],
12+
"1.2.2.ピリオド(.)とカンマ(,)": presetJtfStyle["1.2.2.ピリオド(.)とカンマ(,)"],
13+
"2.1.2.漢字": presetJtfStyle["2.1.2.漢字"],
14+
"2.1.5.カタカナ": presetJtfStyle["2.1.5.カタカナ"],
15+
"2.1.6.カタカナの長音": presetJtfStyle["2.1.6.カタカナの長音"],
16+
"2.1.8.算用数字": presetJtfStyle["2.1.8.算用数字"],
17+
"2.1.9.アルファベット": presetJtfStyle["2.1.9.アルファベット"],
18+
"2.1.10.算用数字の位取りの表記": presetJtfStyle["2.1.10.算用数字の位取りの表記"],
19+
"2.2.1.ひらがなと漢字の使い分け": presetJtfStyle["2.2.1.ひらがなと漢字の使い分け"],
20+
"2.2.2.算用数字と漢数字の使い分け": presetJtfStyle["2.2.2.算用数字と漢数字の使い分け"],
21+
"2.2.3.一部の助数詞の表記": presetJtfStyle["2.2.3.一部の助数詞の表記"],
22+
"3.1.1.全角文字と半角文字の間": presetJtfStyle["3.1.1.全角文字と半角文字の間"],
23+
"3.1.2.全角文字どうし": presetJtfStyle["3.1.2.全角文字どうし"],
24+
"3.2.カタカナ語間のスペースの有無": presetJtfStyle["3.2.カタカナ語間のスペースの有無"],
25+
"3.3.かっこ類と隣接する文字の間のスペースの有無": presetJtfStyle["3.3.かっこ類と隣接する文字の間のスペースの有無"],
26+
"4.1.1.句点(。)": presetJtfStyle["4.1.1.句点(。)"],
27+
"4.1.3.ピリオド(.)、カンマ(,)": presetJtfStyle["4.1.3.ピリオド(.)、カンマ(,)"],
28+
"4.2.1.感嘆符(!)": presetJtfStyle["4.2.1.感嘆符(!)"],
29+
"4.2.2.疑問符(?)": presetJtfStyle["4.2.2.疑問符(?)"],
30+
"4.2.4.中黒(・)": presetJtfStyle["4.2.4.中黒(・)"],
31+
"4.2.5.波線(〜)": presetJtfStyle["4.2.5.波線(〜)"],
32+
"4.2.6.ハイフン(-)": presetJtfStyle["4.2.6.ハイフン(-)"],
33+
"4.2.7.コロン(:)": presetJtfStyle["4.2.7.コロン(:)"],
34+
"4.2.8.セミコロン(;)": presetJtfStyle["4.2.8.セミコロン(;)"],
35+
"4.2.9.ダッシュ(-)": presetJtfStyle["4.2.9.ダッシュ(-)"],
36+
"4.3.1.丸かっこ()": presetJtfStyle["4.3.1.丸かっこ()"],
37+
"4.3.2.大かっこ[]": presetJtfStyle["4.3.2.大かっこ[]"],
38+
"4.3.3.かぎかっこ「」": presetJtfStyle["4.3.3.かぎかっこ「」"],
39+
"4.3.4.二重かぎかっこ『』": presetJtfStyle["4.3.4.二重かぎかっこ『』"],
40+
"4.3.5.二重引用符": presetJtfStyle["4.3.5.二重引用符"],
41+
"4.3.6.中かっこ{ }": presetJtfStyle["4.3.6.中かっこ{ }"],
42+
"4.3.7.山かっこ<>": presetJtfStyle["4.3.7.山かっこ<>"],
43+
"4.3.8.一重引用符": presetJtfStyle["4.3.8.一重引用符"],
44+
"ja-no-space-around-parentheses": presetJaSpacing["ja-no-space-around-parentheses"],
45+
"ja-no-space-between-full-width": presetJaSpacing["ja-no-space-between-full-width"],
46+
"ja-space-between-half-and-full-width": presetJaSpacing["ja-space-between-half-and-full-width"],
47+
"ja-space-around-code": presetJaSpacing["ja-space-around-code"],
48+
"no-mix-dearu-desumasu": moduleInterop(require("textlint-rule-no-mix-dearu-desumasu")),
49+
"no-invalid-control-character": moduleInterop(require("@textlint-rule/textlint-rule-no-invalid-control-character"))
50+
},
51+
rulesConfig: {
52+
"1.1.1.本文": true,
53+
"1.1.2.見出し": true,
54+
"1.1.3.箇条書き": true,
55+
"1.1.5.図表のキャプション": true,
56+
"1.2.1.句点(。)と読点(、)": true,
57+
"1.2.2.ピリオド(.)とカンマ(,)": true,
58+
"2.1.2.漢字": false,
59+
"2.1.5.カタカナ": false,
60+
"2.1.6.カタカナの長音": false,
61+
"2.1.8.算用数字": true,
62+
"2.1.9.アルファベット": true,
63+
"2.1.10.算用数字の位取りの表記": true,
64+
"2.2.1.ひらがなと漢字の使い分け": false,
65+
"2.2.2.算用数字と漢数字の使い分け": true,
66+
"2.2.3.一部の助数詞の表記": true,
67+
"3.1.1.全角文字と半角文字の間": true,
68+
"3.1.2.全角文字どうし": true,
69+
"3.2.カタカナ語間のスペースの有無": true,
70+
"3.3.かっこ類と隣接する文字の間のスペースの有無": true,
71+
"4.1.1.句点(。)": true,
72+
"4.1.3.ピリオド(.)、カンマ(,)": true,
73+
"4.2.1.感嘆符(!)": true,
74+
"4.2.2.疑問符(?)": true,
75+
"4.2.4.中黒(・)": true,
76+
"4.2.5.波線(〜)": true,
77+
"4.2.6.ハイフン(-)": true,
78+
"4.2.7.コロン(:)": true,
79+
"4.2.8.セミコロン(;)": true,
80+
"4.2.9.ダッシュ(-)": true,
81+
"4.3.1.丸かっこ()": true,
82+
"4.3.2.大かっこ[]": true,
83+
"4.3.3.かぎかっこ「」": true,
84+
"4.3.4.二重かぎかっこ『』": true,
85+
"4.3.5.二重引用符": true,
86+
"4.3.6.中かっこ{ }": true,
87+
"4.3.7.山かっこ<>": true,
88+
"4.3.8.一重引用符": true,
89+
"ja-no-space-around-parentheses": true,
90+
"ja-no-space-between-full-width": true,
91+
"ja-space-between-half-and-full-width": {
92+
"space": "always"
93+
},
94+
"ja-space-around-code": {
95+
"before": false,
96+
"after": false
97+
},
98+
"no-mix-dearu-desumasu": {
99+
"preferInHeader": "",
100+
"preferInBody": "ですます",
101+
"preferInList": "である",
102+
"strict": false
103+
},
104+
"no-invalid-control-character": true
105+
}
106+
};

package.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "textlint-rule-preset-vuejs-jp",
3+
"version": "1.0.0",
4+
"description": "",
5+
"keywords": [
6+
"textlint",
7+
"preset"
8+
],
9+
"homepage": "https://github.com/vuejs-jp/textlint-rule-preset-vuejs-jp#readme",
10+
"bugs": {
11+
"url": "https://github.com/vuejs-jp/textlint-rule-preset-vuejs-jp/issues"
12+
},
13+
"license": "MIT",
14+
"author": "vuejs-jp",
15+
"main": "lib/textlint-rule-preset-vuejs-jp.js",
16+
"repository": {
17+
"type": "git",
18+
"url": "git+https://github.com/vuejs-jp/textlint-rule-preset-vuejs-jp.git"
19+
},
20+
"scripts": {
21+
"test": "echo \"Error: no test specified\" && exit 1"
22+
},
23+
"dependencies": {
24+
"@textlint-rule/textlint-rule-no-invalid-control-character": "^2.0.0",
25+
"@textlint/module-interop": "^12.0.0",
26+
"textlint-rule-no-mix-dearu-desumasu": "^5.0.0",
27+
"textlint-rule-preset-ja-spacing": "^2.1.3",
28+
"textlint-rule-preset-jtf-style": "^2.3.12"
29+
}
30+
}

0 commit comments

Comments
 (0)