[eslint config] [patch] set namedComponents option to match style guide

Change the `namedComponents` option to `function-declaration` to match what the style guide requires.

019e0f7e07 (r60060792)
This commit is contained in:
David Petersen
2021-11-10 17:05:21 -06:00
committed by Jordan Harband
parent 38bc026fe4
commit 274c8d5701

View File

@@ -524,9 +524,8 @@ module.exports = {
// Enforce a specific function type for function components
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md
// TODO: investigate if setting namedComponents to expression vs declaration is problematic
'react/function-component-definition': ['error', {
namedComponents: 'function-expression',
namedComponents: ['function-declaration', 'function-expression'],
unnamedComponents: 'function-expression',
}],