Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Textlint #7

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,17 @@ jobs:
- danger/vendor/bundle
key: v1-danger-dependencies-{{ checksum "danger/Gemfile.lock" }}

- restore_cache:
keys:
- v1-danger-yarn-{{ checksum "yarn.lock" }}
- v1-danger-yarn
- run:
command: yarn install
- save_cache:
key: v1-danger-yarn-{{ checksum "yarn.lock" }}
paths:
- node_modules

- run:
# git rootで動かす必要がある
command: bundle exec danger --verbose --dangerfile=danger/Dangerfile
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
yarn-debug.log*
yarn-error.log*
14 changes: 14 additions & 0 deletions .textlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"rules": {
"preset-ja-technical-writing": true,
"spellcheck-tech-word": true
},
"filters": {
"comments": true,
"whitelist": {
"allow": [
// ....
]
}
}
}
2 changes: 2 additions & 0 deletions danger/Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ fail("fit left in tests") if `grep -r fit specs/ `.length > 1

# rubocop
rubocop.lint inline_comment: true

textlint.lint
1 change: 1 addition & 0 deletions danger/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ source 'https://rubygems.org'

gem "danger"
gem "danger-rubocop"
gem "danger-textlint"
gem "onkcop"
gem "pry"
gem "pry-byebug"
5 changes: 5 additions & 0 deletions danger/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ GEM
no_proxy_fix
octokit (~> 4.7)
terminal-table (~> 1)
danger-plugin-api (1.0.0)
danger (> 2.0)
danger-rubocop (0.6.0)
danger
rubocop
danger-textlint (1.2.1)
danger-plugin-api (~> 1.0)
faraday (0.15.2)
multipart-post (>= 1.2, < 3)
faraday-http-cache (1.3.1)
Expand Down Expand Up @@ -82,6 +86,7 @@ PLATFORMS
DEPENDENCIES
danger
danger-rubocop
danger-textlint
onkcop
pry
pry-byebug
Expand Down
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "danger-sample-danger",
"dependencies": {
"textlint": "^11.0.0",
"textlint-filter-rule-comments": "^1.2.2",
"textlint-filter-rule-whitelist": "^2.0.0",
"textlint-rule-preset-ja-technical-writing": "^3.1.0",
"textlint-rule-spellcheck-tech-word": "^5.0.0"
}
}
2 changes: 2 additions & 0 deletions sample-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ Things you may want to cover:
* Deployment instructions

* ...

インターフェース
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 インターフェース => インタフェース(spellcheck-tech-word)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 文末が”。”で終わっていません。(preset-ja-technical-writing/ja-no-mixed-period)

Loading