mirror of
https://github.com/airbnb/javascript.git
synced 2026-04-25 03:00:19 -04:00
[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:
committed by
Jordan Harband
parent
38bc026fe4
commit
274c8d5701
3
packages/eslint-config-airbnb/rules/react.js
vendored
3
packages/eslint-config-airbnb/rules/react.js
vendored
@@ -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',
|
||||
}],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user