Skip to content

Commit 4682fae

Browse files
authored
refactor config.mts (#32)
1 parent 158a527 commit 4682fae

File tree

1 file changed

+15
-14
lines changed
  • packages/eslint-plugin-react-prefer-function-component/src

1 file changed

+15
-14
lines changed

packages/eslint-plugin-react-prefer-function-component/src/config.mts

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,28 @@
22
import type { Linter } from "eslint";
33
import preferFunctionComponent from "./prefer-function-component/index.js";
44

5-
const recommended = {
6-
plugins: {
7-
"react-prefer-function-component": {
8-
rules: {
9-
"react-prefer-function-component": preferFunctionComponent.default,
10-
},
11-
},
12-
},
13-
rules: {
14-
"react-prefer-function-component/react-prefer-function-component": "error",
15-
},
16-
} satisfies Linter.Config;
17-
185
interface Config {
196
configs: {
207
recommended: Linter.Config;
218
};
229
}
2310

2411
const config: Config = {
25-
configs: { recommended },
12+
configs: {
13+
recommended: {
14+
plugins: {
15+
"react-prefer-function-component": {
16+
rules: {
17+
"react-prefer-function-component": preferFunctionComponent.default,
18+
},
19+
},
20+
},
21+
rules: {
22+
"react-prefer-function-component/react-prefer-function-component":
23+
"error",
24+
},
25+
},
26+
},
2627
};
2728

2829
export default config;

0 commit comments

Comments
 (0)