node/tools/eslint/node_modules/@babel/eslint-parser/lib/index.cjs
Node.js GitHub Bot 4d1cc7618e
tools: update eslint to 9.8.0
PR-URL: https://github.com/nodejs/node/pull/54073
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-07-30 16:56:04 +02:00

33 lines
950 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.meta = void 0;
exports.parse = parse;
exports.parseForESLint = parseForESLint;
var _client = require("./client.cjs");
const normalizeESLintConfig = require("./configuration.cjs");
const analyzeScope = require("./analyze-scope.cjs");
const baseParse = require("./parse.cjs");
const client = new _client.LocalClient();
const meta = exports.meta = {
name: "@babel/eslint-parser",
version: "7.25.0"
};
function parse(code, options = {}) {
return baseParse(code, normalizeESLintConfig(options), client);
}
function parseForESLint(code, options = {}) {
const normalizedOptions = normalizeESLintConfig(options);
const ast = baseParse(code, normalizedOptions, client);
const scopeManager = analyzeScope(ast, normalizedOptions, client);
return {
ast,
scopeManager,
visitorKeys: client.getVisitorKeys()
};
}
//# sourceMappingURL=index.cjs.map