Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console warnings with Theme-UI Styled component in Gatsby version 2.31.0 #29287

Closed
Kev-Y-Huang opened this issue Feb 1, 2021 · 1 comment · Fixed by #30023
Closed

Console warnings with Theme-UI Styled component in Gatsby version 2.31.0 #29287

Kev-Y-Huang opened this issue Feb 1, 2021 · 1 comment · Fixed by #30023
Labels
type: upstream Issues outside of Gatsby's control, caused by dependencies

Comments

@Kev-Y-Huang
Copy link

Description

On gatsby version 2.31.0, I am getting console warnings about PascalCase that was raised in bug number 24327 and seemingly addressed in pull request 24560. At some point, the react/jsx-pascal-case rule was changed and so the fix was reverted in 28689.

The console warnings are different for this bug insofar that <Styled.p> tag raises no errors but <Styled.h1> does where as for the previous bug, it seemed that all Styled components raised warnings.

Steps to reproduce

  1. Clone https://github.com/Kev-Y-Huang/theme-ui-styled-bug
  2. Run gatsby develop
  3. Check console

Expected result

Should expect no console warnings to occur.

Actual result

image

Environment

System:
    OS: Windows 10 10.0.18363
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Binaries:
    Node: 12.13.0 - C:\Program Files\nodejs\node.EXE
    npm: 6.12.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
    Chrome: 88.0.4324.104
    Edge: Spartan (44.18362.449.0)
npmPackages:
    gatsby: ^2.31.1 => 2.31.1
npmGlobalPackages:
    gatsby-cli: 2.12.65
@Kev-Y-Huang Kev-Y-Huang added the type: bug An issue or pull request relating to a bug in Gatsby label Feb 1, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 1, 2021
@LekoArts LekoArts added type: upstream Issues outside of Gatsby's control, caused by dependencies and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby labels Feb 1, 2021
@LekoArts
Copy link
Contributor

LekoArts commented Feb 1, 2021

Hi, thanks for the issue!

Please report this as a bug at https://github.com/yannickcr/eslint-plugin-react - going forward we'll want this rule to be enabled as it warns against an incorrect pattern (generally speaking) that makes Fast Refresh behave incorrectly. It expects components to be in PascalCase. Although it's unfortunate that the rule has some false positives, this should be fixed upstream instead of us deactivating the rule again.

In the meantime you could set your own ESLint config or deactivate the rule in the individual file. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: upstream Issues outside of Gatsby's control, caused by dependencies
Projects
None yet
2 participants