mirror of
https://github.com/nodejs/node.git
synced 2025-08-18 15:18:46 +02:00

Greatly simplify how ESLint and its plugins are installed. PR-URL: https://github.com/nodejs/node/pull/53413 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
29 lines
563 B
JavaScript
29 lines
563 B
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
const util_js_1 = require("../util.cjs");
|
|
|
|
function getParser({
|
|
tokenizers
|
|
}) {
|
|
return function parseSpec(source) {
|
|
var _a;
|
|
|
|
let spec = (0, util_js_1.seedSpec)({
|
|
source
|
|
});
|
|
|
|
for (const tokenize of tokenizers) {
|
|
spec = tokenize(spec);
|
|
if ((_a = spec.problems[spec.problems.length - 1]) === null || _a === void 0 ? void 0 : _a.critical) break;
|
|
}
|
|
|
|
return spec;
|
|
};
|
|
}
|
|
|
|
exports.default = getParser;
|
|
//# sourceMappingURL=spec-parser.cjs.map
|