@html-eslint/eslint-plugin
Version:
ESLint plugin for HTML
32 lines (27 loc) • 613 B
JavaScript
/**
* @import {AnyHTMLNode} from "@html-eslint/types"
* @import {AST} from "eslint"
*/
const { VisitNodeStep } = require("@eslint/plugin-kit");
const STEP_PHASE = {
/** @type {1} */
ENTER: 1,
/** @type {2} */
EXIT: 2,
};
class HTMLTraversalStep extends VisitNodeStep {
/**
* @param {Object} options
* @param {AnyHTMLNode | AST.Program} options.target
* @param {1 | 2} options.phase
* @param {any[]} options.args
*/
constructor({ target, phase, args }) {
super({ target, phase, args });
this.target = target;
}
}
module.exports = {
HTMLTraversalStep,
STEP_PHASE,
};