Skip to content

Commit

Permalink
Merge pull request #1893 from mightyiam/missing-dep
Browse files Browse the repository at this point in the history
fix: no use lodash in impl
  • Loading branch information
mightyiam authored Nov 11, 2024
2 parents b567ea5 + 90bb65a commit 8fa2e46
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/rules.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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 }
Expand Down

0 comments on commit 8fa2e46

Please sign in to comment.