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

ESLint fails on Node 15 #200

Closed
MichaelDeBoey opened this issue Apr 11, 2021 · 4 comments
Closed

ESLint fails on Node 15 #200

MichaelDeBoey opened this issue Apr 11, 2021 · 4 comments

Comments

@MichaelDeBoey
Copy link
Contributor

As can be seen in https://github.com/MichaelDeBoey/gatsby-plugin-instagram-embed/runs/2317212678#step:6:17 & https://github.com/robinmetral/gatsby-plugin-pinterest/pull/34/checks?check_run_id=2312829302#step:6:33, ESLint errors out on Node 15 with the following error:

Environment key "jest/globals" is unknown

Both packages only use the default ESLint config, without any changes.

I tried to figure out what could be wrong, but I can't find the problem tbh as jest/globals is set in kentcdodds/jest ESLint config: https://github.com/kentcdodds/eslint-config-kentcdodds/blob/6f2fc42262e63d3288f409e3e62317456d2aa328/jest.js#L29

Working fine on Node 14 and below though 🤔

@kentcdodds
Copy link
Owner

🤷‍♂️ I don't use odd versions of node so I won't be working on this unless it's an issue on Node 16

@MichaelDeBoey
Copy link
Contributor Author

MichaelDeBoey commented Apr 11, 2021

@kentcdodds Have been looking into it a bit more and it seems to be a problem of npm@7.x that's installing peerDependencies too.
As npm@7.x is the default version in Node 15, it only shows up right now, so it will be there in Node 16+ too.

@MichaelDeBoey
Copy link
Contributor Author

MichaelDeBoey commented Apr 11, 2021

@kentcdodds It seems like my errors are coming from a mismatch between the ESLint dependency of gatsby@2.x (eslint@6.8.0) and kcd-scripts@6.4+ (eslint@7.x).

The main 'problem' here was kcd-scripts updated in a minor update without any notice about ESLint@^7.x being used from that point in time.

Not sure how we can prevent such a thing in the future though 🤔🤔

@kentcdodds
Copy link
Owner

Ah, interesting. Well, I think this'll smooth itself over so not sure there's anything else we can do about it from here so I'll just close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants