Skip to content

Commit f6b7eb1

Browse files
authored
Add react- prefix to flat configuration rule (#20)
1 parent d7706d3 commit f6b7eb1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const Foo = ({ foo }) => <div>{foo}</div>;
135135

136136
```js
137137
...
138-
"prefer-function-component": [<enabled>, { "allowComponentDidCatch": <allowComponentDidCatch>, "allowJsxUtilityClass": <allowJsxUtilityClass> }]
138+
"react-prefer-function-component": [<enabled>, { "allowComponentDidCatch": <allowComponentDidCatch>, "allowJsxUtilityClass": <allowJsxUtilityClass> }]
139139
...
140140
```
141141

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ import preferFunctionComponent from "./prefer-function-component/index.js";
33

44
const plugin: ESLint.Plugin = {
55
rules: {
6-
"prefer-function-component": preferFunctionComponent.default,
6+
"react-prefer-function-component": preferFunctionComponent.default,
77
},
88
};
99

1010
const config = {
1111
configs: {
1212
recommended: {
1313
plugins: {
14-
"prefer-function-component": plugin,
14+
"react-prefer-function-component": plugin,
1515
},
1616
rules: {
17-
"prefer-function-component/prefer-function-component": "error",
17+
"react-prefer-function-component/prefer-function-component": "error",
1818
},
1919
},
2020
},

0 commit comments

Comments
 (0)