textlint-rule-helper
Advanced tools
Comparing version 1.2.0 to 2.0.0
@@ -8,5 +8,5 @@ // LICENSE : MIT | ||
var _IgnoreNodeManger = require("./IgnoreNodeManger"); | ||
var _IgnoreNodeManager = require("./IgnoreNodeManager"); | ||
var _IgnoreNodeManger2 = _interopRequireDefault(_IgnoreNodeManger); | ||
var _IgnoreNodeManager2 = _interopRequireDefault(_IgnoreNodeManager); | ||
@@ -16,5 +16,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
module.exports = { | ||
IgnoreNodeManger: _IgnoreNodeManger2.default, | ||
IgnoreNodeManager: _IgnoreNodeManager2.default, | ||
RuleHelper: _textlintRuleHelper2.default | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0E7O0FBQ0E7Ozs7QUFDQTs7Ozs7O0FBQ0EsT0FBTyxPQUFQLEdBQWlCO0FBQ2IsZ0RBRGE7QUFFYjtBQUZhLENBQWpCIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gTElDRU5TRSA6IE1JVFxuXCJ1c2Ugc3RyaWN0XCI7XG5pbXBvcnQgUnVsZUhlbHBlciBmcm9tIFwiLi90ZXh0bGludC1ydWxlLWhlbHBlclwiO1xuaW1wb3J0IElnbm9yZU5vZGVNYW5nZXIgZnJvbSBcIi4vSWdub3JlTm9kZU1hbmdlclwiXG5tb2R1bGUuZXhwb3J0cyA9IHtcbiAgICBJZ25vcmVOb2RlTWFuZ2VyLFxuICAgIFJ1bGVIZWxwZXJcbn07Il19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0E7O0FBQ0E7Ozs7QUFDQTs7Ozs7O0FBQ0EsT0FBTyxPQUFQLEdBQWlCO0FBQ2Isa0RBRGE7QUFFYjtBQUZhLENBQWpCIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gTElDRU5TRSA6IE1JVFxuXCJ1c2Ugc3RyaWN0XCI7XG5pbXBvcnQgUnVsZUhlbHBlciBmcm9tIFwiLi90ZXh0bGludC1ydWxlLWhlbHBlclwiO1xuaW1wb3J0IElnbm9yZU5vZGVNYW5hZ2VyIGZyb20gXCIuL0lnbm9yZU5vZGVNYW5hZ2VyXCJcbm1vZHVsZS5leHBvcnRzID0ge1xuICAgIElnbm9yZU5vZGVNYW5hZ2VyLFxuICAgIFJ1bGVIZWxwZXJcbn07Il19 |
{ | ||
"name": "textlint-rule-helper", | ||
"description": "Helper for textlint rule.", | ||
"version": "1.2.0", | ||
"version": "2.0.0", | ||
"homepage": "https://github.com/textlint/textlint-rule-helper/", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -36,3 +36,3 @@ # textlint-rule-helper | ||
### class IgnoreNodeManger | ||
### class IgnoreNodeManager | ||
@@ -45,2 +45,6 @@ You can manager ignoring range in texts. | ||
**Params** | ||
- node `TxtNode` - target node | ||
#### ignoreRange(range): void | ||
@@ -50,2 +54,6 @@ | ||
**Params** | ||
- range `[number, number]` | ||
#### ignoreChildrenByTypes(targetNode, ignoredNodeTypes): void | ||
@@ -58,4 +66,4 @@ | ||
- targetNode `TxtNode` - target node | ||
- `Array.<string>` - are node types for ignoring | ||
- targetNode `TxtNode` - target node | ||
- ignoredNodeTypes `Array.<string>` - are node types for ignoring | ||
@@ -66,2 +74,6 @@ #### isIgnoredIndex(index): boolean | ||
**Params** | ||
- index `number` - index value start with 0 | ||
#### isIgnoredRange(range): boolean | ||
@@ -71,2 +83,6 @@ | ||
**Params** | ||
- range `[number, number]` | ||
#### isIgnored(node): boolean | ||
@@ -76,2 +92,6 @@ | ||
**Params** | ||
- node `TxtNode` - target node | ||
## Example | ||
@@ -83,6 +103,6 @@ | ||
var RuleHelper = require("textlint-rule-helper").RuleHelper; | ||
var IgnoreNodeManger = require("textlint-rule-helper").IgnoreNodeManger; | ||
var IgnoreNodeManager = require("textlint-rule-helper").IgnoreNodeManager; | ||
module.exports = function (context) { | ||
var helper = new RuleHelper(context); | ||
var ignoreNodeManager = new IgnoreNodeManger() | ||
var ignoreNodeManager = new IgnoreNodeManager() | ||
var exports = {} | ||
@@ -117,2 +137,9 @@ var reportingErrors = []; | ||
## Use-Case | ||
You can see real use-case of this helper library. | ||
- [textlint/rule-advanced.md at master · textlint/textlint](https://github.com/textlint/textlint/blob/master/docs/rule-advanced.md "textlint/rule-advanced.md at master · textlint/textlint") | ||
- [azu/analyze-desumasu-dearu: 文の敬体(ですます調)、常体(である調)を解析するJavaScriptライブラリ](https://github.com/azu/analyze-desumasu-dearu "azu/analyze-desumasu-dearu: 文の敬体(ですます調)、常体(である調)を解析するJavaScriptライブラリ") | ||
## Development | ||
@@ -127,4 +154,2 @@ | ||
npm run test | ||
# Generate README from tempalte | ||
npm run docs | ||
``` | ||
@@ -142,2 +167,2 @@ | ||
MIT | ||
MIT |
// LICENSE : MIT | ||
"use strict"; | ||
import RuleHelper from "./textlint-rule-helper"; | ||
import IgnoreNodeManger from "./IgnoreNodeManger" | ||
import IgnoreNodeManager from "./IgnoreNodeManager" | ||
module.exports = { | ||
IgnoreNodeManger, | ||
IgnoreNodeManager, | ||
RuleHelper | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
24452
158