Skip to content

Conversation

@merceyz
Copy link
Member

@merceyz merceyz commented Apr 12, 2022

What's the problem this PR addresses?

The create-react-app e2e test broke in #4253

How did you fix it?

As a temporary workaround until create-react-app fixes their ESLint setup make eslint a peer dependency /w fallback.

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.
@merceyz merceyz requested a review from arcanis as a code owner April 12, 2022 19:12
@arcanis
Copy link
Member

arcanis commented Apr 12, 2022

I see it fixes the problem, but why? The error message doesn't seem to reference the @types package:

Plugin "react" was conflicted between "package.json » eslint-config-react-app » /tmp/tmp.9cZDOzAoPB/my-cra-ts/.yarn/ __virtual__/eslint-config-react-app-virtual-ba76be021a/4/home/runner/.yarn/berry/cache/eslint-config-react-app-npm- 7.0.0-1ad319c3be-9.zip/node_modules/eslint-config-react-app/base.js" and "BaseConfig » /tmp/tmp.9cZDOzAoPB/ my-cra-ts/.yarn/__virtual__/eslint-config-react-app-virtual-3a91ea80bd/4/home/runner/.yarn/berry/cache/eslint- config-react-app-npm-7.0.0-1ad319c3be-9.zip/node_modules/eslint-config-react-app/base.js". 
@merceyz
Copy link
Member Author

merceyz commented Apr 12, 2022

The auto types causes two instances of eslint-config-react-app, one that has access to @types/eslint and one that doesn't, ESLint doesn't allow the same plugin to show up multiple times so it throws.

@arcanis
Copy link
Member

arcanis commented Apr 13, 2022

That seems something what we should address, otherwise people will hit strange issues with CRA - can't we solve that by adding a peer dependency on eslint to react-scripts, either upstream or extension?

@merceyz merceyz changed the title ci: e2e - fix create-react-app test fix(compat): react-scripts Apr 25, 2022
@merceyz
Copy link
Member Author

merceyz commented Apr 25, 2022

We can, added an entry to the built-in extensions.

@arcanis arcanis merged commit 1bd9d3f into master Apr 26, 2022
@arcanis arcanis deleted the merceyz/ci/cra branch April 26, 2022 10:02
merceyz added a commit that referenced this pull request Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants