pve-eslint/eslint/tests/fixtures/fixture-parser.js
Dominik Csapak eb39fafa4f first commit
includes a (minimal) working wrapper

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-06 15:06:03 +02:00

17 lines
414 B
JavaScript

"use strict";
const path = require("path");
/**
* Gets the path to the specified parser.
*
* @param {string[]} arguments - The path containing the parser.
* @returns {string} The path to the specified parser.
*/
module.exports = function parser() {
const parts = Array.from(arguments);
const name = parts.pop();
return path.resolve(__dirname, "parsers", parts.join(path.sep), `${name}.js`);
};