Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

textlint-rule-helper

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textlint-rule-helper - npm Package Compare versions

Comparing version 2.2.4 to 2.3.0

8

lib/IgnoreNodeManager.d.ts

@@ -1,2 +0,2 @@

import { TxtNode, TxtParentNode, TxtNodeType, TextNodeRange } from "@textlint/ast-node-types";
import { TxtNode, TxtNodeRange, TxtNodeType, TxtParentNode } from "@textlint/ast-node-types";
/**

@@ -12,3 +12,3 @@ * Ignore node manager that manager ignored ranges.

*/
get ignoredRanges(): TextNodeRange[];
get ignoredRanges(): TxtNodeRange[];
/**

@@ -31,3 +31,3 @@ * |.......|

*/
isIgnoredRange(aRange: TextNodeRange): boolean;
isIgnoredRange(aRange: TxtNodeRange): boolean;
/**

@@ -47,3 +47,3 @@ * @param {Object} node

*/
ignoreRange(range: TextNodeRange): void;
ignoreRange(range: TxtNodeRange): void;
/**

@@ -50,0 +50,0 @@ * ignore children node of `node`,

@@ -20,3 +20,3 @@ import type { TextlintRuleContext } from "@textlint/types";

*/
getParents(node: TxtNode): TxtNode[];
getParents(node: TxtNode): import("@textlint/ast-node-types").TxtParentNode[];
/**

@@ -23,0 +23,0 @@ * Return true if `node` is wrapped any one of node {@link types}.

{
"name": "textlint-rule-helper",
"version": "2.2.4",
"version": "2.3.0",
"description": "A helper library for textlint rule.",

@@ -28,3 +28,3 @@ "homepage": "https://github.com/textlint/textlint-rule-helper/",

"dependencies": {
"@textlint/ast-node-types": "^12.3.0",
"@textlint/ast-node-types": "^13.0.2",
"structured-source": "^4.0.0",

@@ -35,8 +35,7 @@ "unist-util-visit": "^2.0.3"

"@textlint/ast-node-types": "^12.1.0",
"@textlint/kernel": "^12.5.0",
"@textlint/textlint-plugin-markdown": "^12.5.0",
"@textlint/types": "^12.5.0",
"@textlint/kernel": "^13.0.2",
"@textlint/textlint-plugin-markdown": "^13.0.2",
"@textlint/types": "^13.0.2",
"@types/mocha": "^10.0.1",
"@types/node": "^18.11.18",
"@types/structured-source": "^3.0.0",
"markdown-to-ast": "^6.0.3",

@@ -46,5 +45,4 @@ "mocha": "^10.2.0",

"ts-node-test-register": "^10.0.0",
"txt-ast-traverse": "^2.0.4",
"typescript": "^4.9.4"
}
}

@@ -11,2 +11,7 @@ # textlint-rule-helper [![Actions Status: test](https://github.com/textlint/textlint-rule-helper/workflows/test/badge.svg)](https://github.com/textlint/textlint-rule-helper/actions?query=workflow%3A"test")

### Support textlint version
- ~2.2: textlint 12>=
- ~2.3: textlint 13>=
## API

@@ -13,0 +18,0 @@

// LICENSE : MIT
"use strict";
import visit from "unist-util-visit";
import { TxtNode, TxtParentNode, TxtNodeType, TextNodeRange } from "@textlint/ast-node-types"
import { TxtNode, TxtNodeRange, TxtNodeType, TxtParentNode } from "@textlint/ast-node-types"

@@ -11,3 +11,3 @@ /**

export default class IgnoreNodeManager {
private _ignoredRangeList: TextNodeRange[];
private _ignoredRangeList: TxtNodeRange[];

@@ -52,3 +52,3 @@ constructor() {

*/
isIgnoredRange(aRange: TextNodeRange) {
isIgnoredRange(aRange: TxtNodeRange) {
return this.isIgnoredIndex(aRange[0]) || this.isIgnoredIndex(aRange[1]);

@@ -78,3 +78,3 @@ }

*/
ignoreRange(range: TextNodeRange) {
ignoreRange(range: TxtNodeRange) {
this._ignoredRangeList.push(range);

@@ -81,0 +81,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc