Skip to content

Commit

Permalink
fix: react/function-component-definition
Browse files Browse the repository at this point in the history
- degraded from error to warn, autofixable
  • Loading branch information
ljosberinn committed Sep 1, 2020
1 parent a6dc5ca commit 57cc211
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions src/__tests__/overrides/__snapshots__/react.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Object {
],
"react/forbid-prop-types": "off",
"react/function-component-definition": Array [
"error",
"warn",
Object {
"namedComponents": "function-declaration",
"unnamedComponents": "arrow-function",
Expand Down Expand Up @@ -301,7 +301,7 @@ Object {
],
"react/forbid-prop-types": "off",
"react/function-component-definition": Array [
"error",
"warn",
Object {
"namedComponents": "function-declaration",
"unnamedComponents": "arrow-function",
Expand Down Expand Up @@ -510,7 +510,7 @@ Object {
],
"react/forbid-prop-types": "off",
"react/function-component-definition": Array [
"error",
"warn",
Object {
"namedComponents": "function-declaration",
"unnamedComponents": "arrow-function",
Expand Down Expand Up @@ -722,7 +722,7 @@ Object {
],
"react/forbid-prop-types": "off",
"react/function-component-definition": Array [
"error",
"warn",
Object {
"namedComponents": "function-declaration",
"unnamedComponents": "arrow-function",
Expand Down Expand Up @@ -929,7 +929,7 @@ Object {
],
"react/forbid-prop-types": "off",
"react/function-component-definition": Array [
"error",
"warn",
Object {
"namedComponents": "function-declaration",
"unnamedComponents": "arrow-function",
Expand Down Expand Up @@ -1139,7 +1139,7 @@ Object {
],
"react/forbid-prop-types": "off",
"react/function-component-definition": Array [
"error",
"warn",
Object {
"namedComponents": "function-declaration",
"unnamedComponents": "arrow-function",
Expand Down Expand Up @@ -1348,7 +1348,7 @@ Object {
],
"react/forbid-prop-types": "off",
"react/function-component-definition": Array [
"error",
"warn",
Object {
"namedComponents": "function-declaration",
"unnamedComponents": "arrow-function",
Expand Down Expand Up @@ -1560,7 +1560,7 @@ Object {
],
"react/forbid-prop-types": "off",
"react/function-component-definition": Array [
"error",
"warn",
Object {
"namedComponents": "function-declaration",
"unnamedComponents": "arrow-function",
Expand Down Expand Up @@ -1767,7 +1767,7 @@ Object {
],
"react/forbid-prop-types": "off",
"react/function-component-definition": Array [
"error",
"warn",
Object {
"namedComponents": "function-declaration",
"unnamedComponents": "arrow-function",
Expand Down
2 changes: 1 addition & 1 deletion src/overrides/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const createReactRules = ({ isNext, version, hasTypeScript }) => ({
* @see https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md
*/
'react/function-component-definition': [
'error',
'warn',
{
namedComponents: 'function-declaration',
unnamedComponents: 'arrow-function',
Expand Down

0 comments on commit 57cc211

Please sign in to comment.