diff --git a/package.json b/package.json index 1f7c4bda0f..4196848c2f 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "prepare": "simple-git-hooks" }, "peerDependencies": { - "@eslint-react/eslint-plugin": "^2.0.1", + "@eslint-react/eslint-plugin": "^2.11.0", "@next/eslint-plugin-next": ">=15.0.0", "@prettier/plugin-xml": "^3.4.1", "@unocss/eslint-plugin": ">=0.50.0", diff --git a/src/configs/react.ts b/src/configs/react.ts index f977cc2ce2..459b997bc1 100644 --- a/src/configs/react.ts +++ b/src/configs/react.ts @@ -54,6 +54,7 @@ export async function react( const typeAwareRules: TypedFlatConfigItem['rules'] = { 'react/no-leaked-conditional-rendering': 'warn', + 'react/no-implicit-key': 'warn', } const [ @@ -121,7 +122,6 @@ export async function react( 'react/no-direct-mutation-state': 'error', 'react/no-duplicate-key': 'error', 'react/no-forward-ref': 'warn', - 'react/no-implicit-key': 'warn', 'react/no-missing-key': 'error', 'react/no-nested-component-definitions': 'error', 'react/no-nested-lazy-component-declarations': 'error', diff --git a/test/__snapshots__/factory/full-on.snap.js b/test/__snapshots__/factory/full-on.snap.js index 9bcc6e439f..81256a203c 100644 --- a/test/__snapshots__/factory/full-on.snap.js +++ b/test/__snapshots__/factory/full-on.snap.js @@ -899,7 +899,6 @@ "react/no-direct-mutation-state", "react/no-duplicate-key", "react/no-forward-ref", - "react/no-implicit-key", "react/no-missing-key", "react/no-nested-component-definitions", "react/no-nested-lazy-component-declarations", @@ -966,6 +965,7 @@ "name": "antfu/react/type-aware-rules", "rules": [ "react/no-leaked-conditional-rendering", + "react/no-implicit-key", ], }, {