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

textlint-rule-helper

Package Overview
Dependencies
Maintainers
2
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.3 to 2.2.4

4

lib/SourceLocation.d.ts

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

import type { TextlintRuleErrorPadding } from "@textlint/types";
import type { TextlintRuleErrorDetails } from "@textlint/types";
import { AnyTxtNode } from "@textlint/ast-node-types";

@@ -6,3 +6,3 @@ export declare class SourceLocation {

constructor(text: string);
toAbsoluteLocation(node: AnyTxtNode, padding: TextlintRuleErrorPadding): number;
toAbsoluteLocation(node: AnyTxtNode, padding: TextlintRuleErrorDetails): number;
}
// LICENSE : MIT
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SourceLocation = void 0;
var structured_source_1 = __importDefault(require("structured-source"));
var structured_source_1 = require("structured-source");
var SourceLocation = /** @class */ (function () {
function SourceLocation(text) {
this.source = new structured_source_1.default(text);
this.source = new structured_source_1.StructuredSource(text);
}

@@ -13,0 +10,0 @@ SourceLocation.prototype.toAbsoluteLocation = function (node, padding) {

import { AnyTxtNode, TxtNodeType } from "@textlint/ast-node-types";
import { TextlintRuleContext, TextlintRuleError, TextlintRuleReportHandler } from "@textlint/types";
import type { TextlintRuleContext, TextlintRuleError, TextlintRuleReportHandler } from "@textlint/types";
export interface wrapReportHandlerOptions {

@@ -4,0 +4,0 @@ /**

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

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

"dependencies": {
"structured-source": "^3.0.2",
"unist-util-visit": "^2.0.3",
"@textlint/ast-node-types": "^12.1.0"
"@textlint/ast-node-types": "^12.3.0",
"structured-source": "^4.0.0",
"unist-util-visit": "^2.0.3"
},
"devDependencies": {
"@textlint/types": "^12.1.0",
"@textlint/ast-node-types": "^12.1.0",
"@types/mocha": "^9.0.0",
"@types/node": "^17.0.5",
"@textlint/kernel": "^12.5.0",
"@textlint/textlint-plugin-markdown": "^12.5.0",
"@textlint/types": "^12.5.0",
"@types/mocha": "^10.0.1",
"@types/node": "^18.11.18",
"@types/structured-source": "^3.0.0",
"markdown-to-ast": "^6.0.3",
"mocha": "^9.1.3",
"textlint": "^12.1.0",
"ts-node": "^10.4.0",
"mocha": "^10.2.0",
"ts-node": "^10.9.1",
"ts-node-test-register": "^10.0.0",
"txt-ast-traverse": "^2.0.4",
"typescript": "^4.5.4"
},
"peerDependencies": {
"@textlint/types": "^12.1.0"
},
"peerDependenciesMeta": {
"@textlint/types": {
"optional": true
}
"typescript": "^4.9.4"
}
}
// LICENSE : MIT
"use strict";
import SourceCode from "structured-source";
import type { TextlintRuleErrorPadding } from "@textlint/types";
import { StructuredSource } from "structured-source";
import type { TextlintRuleErrorDetails } from "@textlint/types";
import { AnyTxtNode } from "@textlint/ast-node-types";
export class SourceLocation {
private source: SourceCode;
private source: StructuredSource;
constructor(text: string) {
this.source = new SourceCode(text);
this.source = new StructuredSource(text);
}
toAbsoluteLocation(node: AnyTxtNode, padding: TextlintRuleErrorPadding) {
toAbsoluteLocation(node: AnyTxtNode, padding: TextlintRuleErrorDetails) {
const nodeRange = node.range;

@@ -16,0 +16,0 @@ const line = node.loc.start.line;

// MIT © 2018 azu
"use strict";
import { AnyTxtNode, TxtNodeType } from "@textlint/ast-node-types";
import { TextlintRuleContext, TextlintRuleError, TextlintRuleReportHandler } from "@textlint/types";
import type { TextlintRuleContext, TextlintRuleError, TextlintRuleReportHandler } from "@textlint/types";
import RuleHelper from "./textlint-rule-helper";

@@ -6,0 +6,0 @@ import IgnoreNodeManager from "./IgnoreNodeManager";

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