@elsikora/eslint-config
Version:
ESLint configuration vision of ElsiKora
19 lines (16 loc) • 619 B
JavaScript
import { PLUGIN_MAP } from '../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(PLUGIN_MAP).sort((a, b) => b[0].length - a[0].length)) {
if (pluginName === oldName) {
return pluginName.replace(pluginName, newName);
}
}
return pluginName;
}
export { formatPluginName };
//# sourceMappingURL=format-plugin-name.utility.js.map