Skip to content

Commit

Permalink
fix(eslint): cannot redefine plugin "unicorn"
Browse files Browse the repository at this point in the history
* already set by `@​antfu/eslint-config`
  • Loading branch information
DrJume committed Jun 27, 2024
1 parent d05fd90 commit 8661fc4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,17 @@ export function eslintConfig(
})
.prepend(github)
.append(nuxt ? nuxtRules : [])
.append(unicorn && eslintPluginUnicorn.configs['flat/recommended'])
.append(
(async () => {
if (!unicorn) return

/** @type import('eslint').Linter.FlatConfig */
const unicornConfig = eslintPluginUnicorn.configs['flat/recommended']
delete unicornConfig.plugins

return unicornConfig
})(),
)
.append({
name: 'falcondev/rules',
rules: {
Expand Down

0 comments on commit 8661fc4

Please sign in to comment.