UNPKG

@elsikora/eslint-config

Version:

ESLint configuration vision of ElsiKora

21 lines (17 loc) 676 B
'use strict'; var pluginMap_constant = require('../constant/utility/plugin-map.constant.js'); /** * Formats a plugin name according to mapping rules * @param {string} pluginName - The name of the plugin to format * @returns {string} The formatted plugin name */ function formatPluginName(pluginName) { for (const [oldName, newName] of Object.entries(pluginMap_constant.PLUGIN_MAP).sort((a, b) => b[0].length - a[0].length)) { if (pluginName === oldName) { return pluginName.replace(pluginName, newName); } } return pluginName; } exports.formatPluginName = formatPluginName; //# sourceMappingURL=format-plugin-name.utility.js.map