Skip to content

Commit

Permalink
feat(rule): allowNodeTypes オプションを追加 (#13)
Browse files Browse the repository at this point in the history
* chore(deps): add prettier

* fix(rule): support skipNodeTypes and fix list bug

fix #1
fix #5

* fix typo

* chore(README): add `skipNodeTypes`
  • Loading branch information
azu authored Jan 3, 2019
1 parent c7d9277 commit 55bbc93
Show file tree
Hide file tree
Showing 8 changed files with 2,802 additions and 1,575 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ Via CLI

textlint --rule ja-no-redundant-expression README.md

## Options

- `allowNodeTypes`: `string[]`
- 無視したいNode typeを配列で指定
- Node typeは <https://textlint.github.io/docs/txtnode.html#type> を参照
- デフォルトでは、`["BlockQuote", "Link", "ReferenceDef"]`を指定し、引用やリンクのテキストは無視する

## Changelog

See [Releases page](https://github.com/textlint-ja/textlint-rule-ja-no-redundant-expression/releases).
Expand Down
30 changes: 26 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"docs": "node tools/update-readme.js",
"prepublish": "npm run docs && npm run --if-present build",
"build": "textlint-scripts build",
"watch": "textlint-scripts build --watch"
"watch": "textlint-scripts build --watch",
"prettier": "prettier --write \"**/*.{js,jsx,ts,tsx,css}\""
},
"repository": {
"type": "git",
Expand All @@ -30,14 +31,35 @@
"homepage": "https://github.com/textlint-ja/textlint-rule-ja-no-redundant-expression",
"devDependencies": {
"add-text-to-markdown": "^2.0.0",
"textlint-scripts": "^1.2.2"
"husky": "^1.3.1",
"lint-staged": "^8.1.0",
"prettier": "^1.15.3",
"textlint-scripts": "^2.1.0"
},
"dependencies": {
"kuromojin": "^1.3.2",
"morpheme-match": "^1.2.1",
"morpheme-match-all": "^1.2.0"
"morpheme-match-all": "^1.2.0",
"textlint-rule-helper": "^2.1.1",
"textlint-util-to-string": "^2.1.1"
},
"keywords": [
"textlintrule"
]
],
"prettier": {
"singleQuote": false,
"printWidth": 120,
"tabWidth": 4
},
"husky": {
"hooks": {
"precommit": "lint-staged"
}
},
"lint-staged": {
"*.{js,jsx,ts,tsx,css}": [
"prettier --write",
"git add"
]
}
}
Loading

0 comments on commit 55bbc93

Please sign in to comment.