@@ -121,6 +121,8 @@ pub enum RuleSource {
121
121
EslintReactRefresh ( & ' static str ) ,
122
122
/// Rules from [eslint-react.xyz](https://eslint-react.xyz/)
123
123
EslintReactXyz ( & ' static str ) ,
124
+ /// Rules from [Eslint Plugin React Prefer Function Component](https://github.com/tatethurston/eslint-plugin-react-prefer-function-component)
125
+ ReactPreferFunctionComponent ( & ' static str ) ,
124
126
/// Rules from [Eslint Plugin Solid](https://github.com/solidjs-community/eslint-plugin-solid)
125
127
EslintSolid ( & ' static str ) ,
126
128
/// Rules from [Eslint Plugin Sonar](https://github.com/SonarSource/eslint-plugin-sonarjs)
@@ -178,6 +180,9 @@ impl std::fmt::Display for RuleSource {
178
180
Self :: EslintReactHooks ( _) => write ! ( f, "eslint-plugin-react-hooks" ) ,
179
181
Self :: EslintReactRefresh ( _) => write ! ( f, "eslint-plugin-react-refresh" ) ,
180
182
Self :: EslintReactXyz ( _) => write ! ( f, "@eslint-react/eslint-plugin" ) ,
183
+ Self :: ReactPreferFunctionComponent ( _) => {
184
+ write ! ( f, "eslint-plugin-react-prefer-function-component" )
185
+ }
181
186
Self :: EslintSolid ( _) => write ! ( f, "eslint-plugin-solid" ) ,
182
187
Self :: EslintSonarJs ( _) => write ! ( f, "eslint-plugin-sonarjs" ) ,
183
188
Self :: EslintStylistic ( _) => write ! ( f, "eslint-plugin-stylistic" ) ,
@@ -253,6 +258,7 @@ impl RuleSource {
253
258
| Self :: EslintReactHooks ( rule_name)
254
259
| Self :: EslintReactRefresh ( rule_name)
255
260
| Self :: EslintReactXyz ( rule_name)
261
+ | Self :: ReactPreferFunctionComponent ( rule_name)
256
262
| Self :: EslintTypeScript ( rule_name)
257
263
| Self :: EslintSolid ( rule_name)
258
264
| Self :: EslintSonarJs ( rule_name)
@@ -287,6 +293,9 @@ impl RuleSource {
287
293
Self :: EslintReactHooks ( rule_name) => format ! ( "react-hooks/{rule_name}" ) ,
288
294
Self :: EslintReactRefresh ( rule_name) => format ! ( "react-refresh/{rule_name}" ) ,
289
295
Self :: EslintReactXyz ( rule_name) => format ! ( "@eslint-react/{rule_name}" ) ,
296
+ Self :: ReactPreferFunctionComponent ( rule_name) => {
297
+ format ! ( "react-prefer-function-component/{rule_name}" )
298
+ }
290
299
Self :: EslintTypeScript ( rule_name) => format ! ( "@typescript-eslint/{rule_name}" ) ,
291
300
Self :: EslintSolid ( rule_name) => format ! ( "solidjs/{rule_name}" ) ,
292
301
Self :: EslintSonarJs ( rule_name) => format ! ( "sonarjs/{rule_name}" ) ,
@@ -322,6 +331,7 @@ impl RuleSource {
322
331
Self :: EslintReactHooks ( _) => "https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/README.md" . to_string ( ) ,
323
332
Self :: EslintReactRefresh ( _) => "https://github.com/ArnaudBarre/eslint-plugin-react-refresh" . to_string ( ) ,
324
333
Self :: EslintReactXyz ( rule_name) => format ! ( "https://eslint-react.xyz/docs/rules/{rule_name}" ) ,
334
+ Self :: ReactPreferFunctionComponent ( _) => "https://github.com/tatethurston/eslint-plugin-react-prefer-function-component" . to_string ( ) ,
325
335
Self :: EslintTypeScript ( rule_name) => format ! ( "https://typescript-eslint.io/rules/{rule_name}" ) ,
326
336
Self :: EslintSolid ( rule_name) => format ! ( "https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/{rule_name}.md" ) ,
327
337
Self :: EslintSonarJs ( rule_name) => format ! ( "https://github.com/SonarSource/eslint-plugin-sonarjs/blob/HEAD/docs/rules/{rule_name}.md" ) ,
0 commit comments