Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@eslint/plugin-kit

Latest version: v0.7.3

Overview

Last scanned
3 Sep 2026
Published
3 Sep 2026
npm package Publisher: eslintbot, openjsfoundation
344 Stars
51 Forks
1 Versions
463.3M Downloads
JavaScript Repo language

Scan summary

@eslint/plugin-kit was last scanned on 3 Sep 2026 at version 0.7.3. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 3 Sep 2026.
  • Findings: No rules fired in version 0.7.3.
  • Downloads: 463,317,188 downloads.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
0.7.3 LATEST 3 Sep 2026 No rules fired

No rules fired in 0.7.3

Findings

Findings for v0.7.3. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.7.3; other versions have their own rules, not their own score.

Known vulnerabilities

2 CVEs · last 18 Jul 2025

0 CRITICAL 1 HIGH 0 MEDIUM 1 LOW

Versions

  • ≥ 0.3.4
  • ≥ 0.2.3, < 0.3.4 1 LOW
  • < 0.2.3 1 HIGH 1 LOW

Vulnerabilities

  • GHSA-XFFM-G5W8-QVG7 Low 18 Jul 2025 @eslint/plugin-kit is vulnerable to Regular Expression Denial of Service attacks through ConfigCommentParser Fixed in 0.3.4
  • CVE-2024-21539 High 19 Nov 2024 @eslint/plugin-kit: ReDoS Vulnerability in @eslint/plugin-kit Fixed in 0.2.3

README

The publisher’s own README, as collected from the registry.

ESLint Plugin Kit

Description

A collection of utilities to help build ESLint plugins.

Installation

For Node.js and compatible runtimes:

npm install @eslint/plugin-kit
# or
yarn add @eslint/plugin-kit
# or
pnpm install @eslint/plugin-kit
# or
bun add @eslint/plugin-kit

For Deno:

deno add @eslint/plugin-kit

Usage

This package exports the following utilities:

  • ConfigCommentParser - used to parse ESLint configuration comments (i.e., /* eslint-disable rule */)
  • VisitNodeStep and CallMethodStep - used to help implement SourceCode#traverse()
  • Directive - used to help implement SourceCode#getDisableDirectives()
  • TextSourceCodeBase - base class to help implement the SourceCode interface
ConfigCommentParser

To use the ConfigCommentParser class, import it from the package and create a new instance, such as:

import { ConfigCommentParser } from "@eslint/plugin-kit";

// create a new instance
const commentParser = new ConfigCommentParser();

// pass in a comment string without the comment delimiters
const directive = commentParser.parseDirective(
    "eslint-disable prefer-const, no-var -- I don't want to use these.",
);

// will be undefined when a directive can't be parsed
if (directive) {
    console.log(directive.label); // "eslint-disable"
    console.log(directive.value); // "prefer-const, no-var"
    console.log(directive.justification); // "I don't want to use these."
}

There are different styles of directive values that you'll need to parse separately to get the correct format:

import { ConfigCommentParser } from "@eslint/plugin-kit";

// create a new instance
const commentParser = new ConfigCommentParser();

// list format
const list = commentParser.parseListConfig("prefer-const, no-var");
console.log(Object.entries(list)); // [["prefer-const", true], ["no-var", true]]

// string format
const strings = commentParser.parseStringConfig("foo:off, bar");
console.log(Object.entries(strings)); // [["foo", "off"], ["bar", null]]

// JSON-like config format
const jsonLike = commentParser.parseJSONLikeConfig(
    "radix:[error, always], prefer-const: warn",
);
console.log(Object.entries(jsonLike.config)); // [["radix", ["error", "always"]], ["prefer-const", "warn"]]
VisitNodeStep and CallMethodStep

The VisitNodeStep and CallMethodStep classes represent steps in the traversal of source code. They implement the correct interfaces to return from the SourceCode#traverse() method.

The VisitNodeStep class is the more common of the two, where you are describing a visit to a particular node during the traversal. The constructor accepts three arguments:

  • target - the node being visited. This is used to determine the method to call inside of a rule. For instance, if the node's type is Literal then ESLint will call a method named Literal() on the rule (if present).
  • phase - either 1 for enter or 2 for exit.
  • args - an array of arguments to pass into the visitor method of a rule.

For example:

import { VisitNodeStep } from "@eslint/plugin-kit";

class MySourceCode {
    traverse() {
        const steps = [];

        for (const { node, parent, phase } of iterator(this.ast)) {
            steps.push(
                new VisitNodeStep({
                    target: node,
                    phase: phase === "enter" ? 1 : 2,
                    args: [node, parent],
                }),
            );
        }

        return steps;
    }
}

The CallMethodStep class is less common and is used to tell ESLint to call a specific method on the rule. The constructor accepts two arguments:

  • target - the name of the method to call, frequently beginning with "on" such as "onCodePathStart".
  • args - an array of arguments to pass to the method.

For example:

import { VisitNodeStep, CallMethodStep } from "@eslint/plugin-kit";

class MySourceCode {
    traverse() {
        const steps = [];

        for (const { node, parent, phase } of iterator(this.ast)) {
            steps.push(
                new VisitNodeStep({
                    target: node,
                    phase: phase === "enter" ? 1 : 2,
                    args: [node, parent],
                }),
            );

            // call a method indicating how many times we've been through the loop
            steps.push(
                new CallMethodStep({
                    target: "onIteration",
                    args: [steps.length]
                });
            )
        }

        return steps;
    }
}
Directive

The Directive class represents a disable directive in the source code and implements the Directive interface from @eslint/core. You can tell ESLint about disable directives using the SourceCode#getDisableDirectives() method, where part of the return value is an array of Directive objects. Here's an example:

import { Directive, ConfigCommentParser } from "@eslint/plugin-kit";

class MySourceCode {
    getDisableDirectives() {
        const directives = [];
        const problems = [];
        const commentParser = new ConfigCommentParser();

        // read in the inline config nodes to check each one
        this.getInlineConfigNodes().forEach(comment => {
            // Step 1: Parse the directive
            const { label, value, justification } =
                commentParser.parseDirective(comment.value);

            // Step 2: Extract the directive value and create the `Directive` object
            switch (label) {
                case "eslint-disable":
                case "eslint-enable":
                case "eslint-disable-next-line":
                case "eslint-disable-line": {
                    const directiveType = label.slice("eslint-".length);

                    directives.push(
                        new Directive({
                            type: directiveType,
                            node: comment,
                            value,
                            justification,
                        }),
                    );
                }

                // ignore any comments that don't begin with known labels
            }
        });

        return {
            directives,
            problems,
        };
    }
}
TextSourceCodeBase

The TextSourceCodeBase class is intended to be a base class that has several of the common members found in SourceCode objects already implemented. Those members are:

  • lines - an array of text lines that is created automatically when the constructor is called.
  • getLoc(nodeOrToken) - gets the location of a node or token. Works for nodes that have the ESLint-style loc property and nodes that have the Unist-style position property. If you're using an AST with a different location format, you'll still need to implement this method yourself.
  • getLocFromIndex(index) - Converts a source text index into a { line: number, column: number } pair. (For this method to work, the root node should always cover the entire source code text, and the getLoc() method needs to be implemented correctly.)
  • getIndexFromLoc(loc) - Converts a { line: number, column: number } pair into a source text index. (For this method to work, the root node should always cover the entire source code text, and the getLoc() method needs to be implemented correctly.)
  • getRange(nodeOrToken) - gets the range of a node or token within the source text. Works for nodes that have the ESLint-style range property and nodes that have the Unist-style position property. If you're using an AST with a different range format, you'll still need to implement this method yourself.
  • getText(node, beforeCount, afterCount) - gets the source text for the given node that has range information attached. If node is omitted or falsy (such as undefined, null, or an empty string), the entire source text is returned. Optionally, can return additional characters before and after the given node. As long as getRange() is properly implemented, this method will just work.
  • getAncestors(node) - returns the ancestry of the node. In order for this to work, you must implement the getParent() method yourself.

Here's an example:

import { TextSourceCodeBase } from "@eslint/plugin-kit";

export class MySourceCode extends TextSourceCodeBase {
    #parents = new Map();

    constructor({ ast, text }) {
        super({ ast, text });
    }

    getParent(node) {
        return this.#parents.get(node);
    }

    traverse() {
        const steps = [];

        for (const { node, parent, phase } of iterator(this.ast)) {
            //save the parent information
            this.#parents.set(node, parent);

            steps.push(
                new VisitNodeStep({
                    target: node,
                    phase: phase === "enter" ? 1 : 2,
                    args: [node, parent],
                }),
            );
        }

        return steps;
    }
}

In general, it's safe to collect the parent information during the traverse() method as getParent() and getAncestors() will only be called from rules once the AST has been traversed at least once.

License

Apache 2.0

Sponsors

The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. Become a Sponsor to get your logo on our READMEs and website.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @eslint/plugin-kit

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Frame 2085668439 (1)
Group 1261154229