Skip to content

Commit f2aac68

Browse files
Introduction of textlint (#97)
1 parent 64d3786 commit f2aac68

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22
"devDependencies": {
33
"node-sass": "^4.13.1",
44
"sass-loader": "^8.0.2",
5+
"shelljs": "^0.8.4",
6+
"textlint": "^11.7.6",
7+
"textlint-checker-for-vuejs-jp-docs": "git+https://github.com/vuejs-jp/textlint-checker-for-vuejs-jp-docs.git",
8+
"textlint-plugin-jtf-style": "^1.0.1",
9+
"textlint-rule-detect-bad-chars": "^1.0.2",
10+
"textlint-rule-no-mix-dearu-desumasu": "^4.0.1",
511
"vuepress": "^1.5.4"
612
},
713
"scripts": {
814
"serve": "vuepress dev src",
9-
"build": "vuepress build src"
15+
"build": "vuepress build src",
16+
"test": "npm run lint",
17+
"lint": "node -e \"var shell=require('shelljs');var files=shell.find(['./src/**/*.md']).filter(function(file){return !file.endsWith('/guide/team.md')}).join(' ');if(shell.exec('textlint --rulesdir ./node_modules/textlint-checker-for-vuejs-jp-docs/rules/textlint-rule-vue-jp-docs -f pretty-error '+files).code!==0){shell.exit(1)};\""
1018
},
1119
"dependencies": {
1220
"@docsearch/css": "^1.0.0-alpha.27",

src/.textlintrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"rules": {
3+
"textlint-rule-detect-bad-chars": {
4+
5+
},
6+
"preset-jtf-style": {
7+
"1.1.3.箇条書き": false,
8+
"2.1.5.カタカナ": false,
9+
"2.1.6.カタカナの長音": false,
10+
"3.1.1.全角文字と半角文字の間": false,
11+
"3.1.2.全角文字どうし": false,
12+
"4.2.6.ハイフン(-)": false,
13+
"4.2.7.コロン(:)": false,
14+
"4.3.1.丸かっこ()": false,
15+
"4.3.2.大かっこ[]": false
16+
},
17+
"no-mix-dearu-desumasu": {
18+
"preferInHeader": "",
19+
"preferInBody": "ですます",
20+
"preferInList": "ですます",
21+
"strict": true
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)