Skip to content

Commit 9620699

Browse files
authored
Merge pull request #5 from react-native-jp/add-textlint
Add textlint
2 parents 6017050 + e182abf commit 9620699

File tree

4 files changed

+1498
-51
lines changed

4 files changed

+1498
-51
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ website/build/
88

99
sync-api-docs/generatedComponentApiDocs.js
1010
sync-api-docs/extracted.json
11+
12+
.cache
13+
.textlintcache

.textlintrc.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
filters: {}
3+
rules:
4+
preset-ja-technical-writing: true
5+
"@textlint-ja/no-synonyms": true
6+
"@proofdict/proofdict":
7+
dictURL: https://react-native-jp.github.io/proof-dictionary/

package.json

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,29 @@
77
],
88
"scripts": {
99
"postinstall": "yarn update-lock",
10-
"update-lock": "npx yarn-deduplicate"
10+
"update-lock": "npx yarn-deduplicate",
11+
"lint": "textlint --cache $(git diff master --name-only)",
12+
"lint:fix": "npm run lint -- --fix",
13+
"p": "pretty-quick --staged"
1114
},
1215
"husky": {
1316
"hooks": {
14-
"pre-commit": "pretty-quick --staged"
17+
"pre-commit": "lint-staged"
1518
}
1619
},
20+
"lint-staged": {
21+
"*.md": "textlint",
22+
"*.@(ts|tsx|js|jsx)": "pretty-quick --staged"
23+
},
1724
"devDependencies": {
25+
"@proofdict/textlint-rule-proofdict": "^3.1.1",
26+
"@textlint-ja/textlint-rule-no-synonyms": "^1.1.0",
1827
"husky": "^4.2.5",
28+
"lint-staged": "^10.5.4",
1929
"prettier": "^2.2.1",
20-
"pretty-quick": "^3.1.0"
30+
"pretty-quick": "^3.1.0",
31+
"sudachi-synonyms-dictionary": "^6.0.0",
32+
"textlint": "^11.8.2",
33+
"textlint-rule-preset-ja-technical-writing": "^4.0.1"
2134
}
2235
}

0 commit comments

Comments
 (0)