From 90bb65a35bbd674485ec346f8df7f5ed32bfb091 Mon Sep 17 00:00:00 2001 From: "Shahar \"Dawn\" Or" Date: Mon, 11 Nov 2024 19:45:13 +0700 Subject: [PATCH] fix: no use lodash in impl fixes #1892 --- src/rules.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/rules.ts b/src/rules.ts index 3cb91e84..05a5168d 100644 --- a/src/rules.ts +++ b/src/rules.ts @@ -1,5 +1,4 @@ import type { TSESLint } from '@typescript-eslint/utils' -import _ from 'lodash' import eslintCommentsRules from './rules/eslint-comments.js' import eslintRules from './rules/eslint.js' @@ -36,8 +35,13 @@ export const { rulesPerPlugin, rules, plugins }: Exports = acc.plugins[pluginName] = plugin } - const rules = _.mapKeys(localRules, (_rule, localRuleName) => - plugin === 'eslint' ? localRuleName : `${pluginName}/${localRuleName}`, + const rules = Object.fromEntries( + Object.entries(localRules).map(([localRuleName, ruleConfig]) => [ + plugin === 'eslint' + ? localRuleName + : `${pluginName}/${localRuleName}`, + ruleConfig, + ]), ) acc.rulesPerPlugin[pluginName] = rules acc.rules = { ...acc.rules, ...rules }