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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

React (CRA) broken with eslint 5.x (manual work-around available) #3

Open
1 of 3 tasks
kiprasmel opened this issue Feb 2, 2020 · 2 comments
Open
1 of 3 tasks
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@kiprasmel
Copy link
Owner

kiprasmel commented Feb 2, 2020

Issue originally reported by @okovalov 馃敟

I will:

  • attempt upgrading eslint to 6.x.
    Previously I've had numerous issues with the v6; it's time to try again.

  • upgrade eslint to 6.x in this config

  • take care of related dependencies to match the upgraded version of eslint.


Edit:

Manual work-around: #3 (comment):

See also https://github.com/sarpik/eslint-config-sarpik#with-create-react-app

@kiprasmel kiprasmel added the bug Something isn't working label Feb 2, 2020
@kiprasmel kiprasmel self-assigned this Feb 2, 2020
@kiprasmel kiprasmel added the help wanted Extra attention is needed label Feb 2, 2020
@kiprasmel
Copy link
Owner Author

kiprasmel commented Feb 2, 2020

React (from CRA) works with eslint v6 (which solves this issue - upgrade eslint to v6 in your react app and see #4),

but then - standalone files from the global ~/.eslintrc.js config do not work:

$ eslint --ext js,jsx,ts,tsx ~/foo.js

Oops! Something went wrong! :(

ESLint: 6.8.0.

ESLint couldn't find the config "airbnb" to extend from. Please check that the name of the config is correct.

The config "airbnb" was referenced from the config file in "/home/kipras/.eslintrc.js".

If you still have problems, please stop by https://gitter.im/eslint/eslint to chat with the team.

this kinda sucks:D Any thoughts anyone?

I've taken a look at similar forks with typescript support, namely https://github.com/onepassapp/eslint-config-onepass, and they have the same issue as of writing this.


Edit:

I'm thinking about having two separate releases:

  • the eslint-config-sarpik one which has eslint as 5.x, and
  • the eslint-config-sarpik@eslint6, which would have eslint v 6.x and would be used for react projects etc.

Because I don't currently think that I can make eslint work with both a global setup & a react project.

@kiprasmel kiprasmel pinned this issue Feb 2, 2020
@kiprasmel kiprasmel changed the title React (CRA) broken with eslint 5.x React (CRA) broken with eslint 5.x (manual work-around available) Feb 2, 2020
kiprasmel added a commit that referenced this issue Feb 2, 2020
See #3 (#3)

Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
@kiprasmel
Copy link
Owner Author

kiprasmel commented Feb 3, 2020

Update: I've just tried setting up CRA again, and everything worked fine with eslint 5.x - da hek?
I know that today I've came into the issue somehow, but now i'ts gone..

Will update this soon.


Edit:

Nevermind, eslint does work, but then react itself does not:D

Keeping this solution as is until we find something better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant