We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
namedComponents
1 parent 38bc026 commit 274c8d5Copy full SHA for 274c8d5
packages/eslint-config-airbnb/rules/react.js
@@ -524,9 +524,8 @@ module.exports = {
524
525
// Enforce a specific function type for function components
526
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md
527
- // TODO: investigate if setting namedComponents to expression vs declaration is problematic
528
'react/function-component-definition': ['error', {
529
- namedComponents: 'function-expression',
+ namedComponents: ['function-declaration', 'function-expression'],
530
unnamedComponents: 'function-expression',
531
}],
532
0 commit comments