Skip to content

Commit

Permalink
[eslint config] set namedComponents option to match style guide
Browse files Browse the repository at this point in the history
Change the `namedComponents` option to `function-declaration` to match what the style guide requires.

019e0f7#r60060792
  • Loading branch information
petersendidit committed Nov 30, 2021
1 parent 371537f commit 4af5a31
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/eslint-config-airbnb/rules/react.js
Expand Up @@ -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',
}],

Expand Down

0 comments on commit 4af5a31

Please sign in to comment.