diff --git a/packages/eslint-plugin-react-prefer-function-component/src/config.mts b/packages/eslint-plugin-react-prefer-function-component/src/config.mts index bdd6c69..23630fd 100644 --- a/packages/eslint-plugin-react-prefer-function-component/src/config.mts +++ b/packages/eslint-plugin-react-prefer-function-component/src/config.mts @@ -2,19 +2,6 @@ import type { Linter } from "eslint"; import preferFunctionComponent from "./prefer-function-component/index.js"; -const recommended = { - plugins: { - "react-prefer-function-component": { - rules: { - "react-prefer-function-component": preferFunctionComponent.default, - }, - }, - }, - rules: { - "react-prefer-function-component/react-prefer-function-component": "error", - }, -} satisfies Linter.Config; - interface Config { configs: { recommended: Linter.Config; @@ -22,7 +9,21 @@ interface Config { } const config: Config = { - configs: { recommended }, + configs: { + recommended: { + plugins: { + "react-prefer-function-component": { + rules: { + "react-prefer-function-component": preferFunctionComponent.default, + }, + }, + }, + rules: { + "react-prefer-function-component/react-prefer-function-component": + "error", + }, + }, + }, }; export default config;