Skip to content

Commit d41477c

Browse files
committed
feat(coverage): add coverage using txtlint for text
https://github.com/azu/textlint-formatter-codecov + https://codecov.io/
1 parent 941cad6 commit d41477c

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
sudo: false
22
language: node_js
33
node_js: "stable"
4+
after_success:
5+
- npm run travis:coverage
46
cache:
57
directories:
68
- node_modules

coverage.textlintrc

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"rules": {
3+
"max-ten": {
4+
"max": 3
5+
},
6+
"no-double-negative-ja": true,
7+
"no-doubled-joshi": {
8+
"min_interval": 1,
9+
"strict": true
10+
},
11+
"sentence-length": {
12+
"max": 100
13+
},
14+
"no-start-duplicated-conjunction": {
15+
"interval": 3
16+
},
17+
"spellcheck-tech-word": true,
18+
"no-mix-dearu-desumasu": true,
19+
"prh": {
20+
"rulePaths": [
21+
"test/prh.yml"
22+
]
23+
},
24+
"preset-jtf-style": {
25+
"2.1.2.漢字": true,
26+
"4.2.2.疑問符(?)": false,
27+
"4.3.1.丸かっこ()": false
28+
}
29+
}
30+
}

package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"textlint": "summary-to-path | xargs textlint -f pretty-error",
2727
"test:example": "find ./src -name '*-example.js' | xargs babel-node",
2828
"test:js": "mocha",
29-
"test": "npm-run-all --parallel test:js test:example textlint eslint:md eslint build"
29+
"test": "npm-run-all --parallel test:js test:example textlint eslint:md eslint build",
30+
"travis:coverage": "summary-to-path | xargs textlint -c coverage.textlintrc -f codecov | codecov"
3031
},
3132
"keywords": [
3233
"ebook",
@@ -36,6 +37,7 @@
3637
"devDependencies": {
3738
"babel-cli": "^6.3.13",
3839
"babel-preset-es2015": "^6.3.13",
40+
"codecov.io": "^0.1.6",
3941
"connect": "^3.4.0",
4042
"eslint": "^1.3.0",
4143
"eslint-plugin-markdown": "git://github.com/eslint/eslint-plugin-markdown.git",
@@ -56,7 +58,8 @@
5658
"npm-run-all": "^1.2.8",
5759
"power-assert": "^1.0.0",
5860
"stemming-x-keywords": "^1.0.3",
59-
"textlint": "^5.0.0-beta.0",
61+
"textlint": "^5.2.0",
62+
"textlint-formatter-codecov": "^1.0.2",
6063
"textlint-rule-max-ten": "^2.0.0",
6164
"textlint-rule-no-double-negative-ja": "^1.0.2",
6265
"textlint-rule-no-doubled-joshi": "^2.0.0",

0 commit comments

Comments
 (0)