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 v8 Support @ijsto/eslint-config #10

Closed
rtritto opened this issue Oct 10, 2021 · 13 comments
Closed

ESLint v8 Support @ijsto/eslint-config #10

rtritto opened this issue Oct 10, 2021 · 13 comments
Labels
[CONFIRMED] Confirmed and needs to be fixed.

Comments

@rtritto
Copy link
Contributor

rtritto commented Oct 10, 2021

eslint version 8 was released and I got warning on install step.

Step to reproduce

  1. yarn init -y
  2. yarn set version berry
  3. yarn add eslint @ijsto/eslint-config

Result

Actual

...
➤ YN0060: │ test-eslint@workspace:. provides eslint (p05a5b) with version 8.0.0, which doesn't satisfy what @ijsto/eslint-config and some of its descendants request
...

Expect

No warning in log

Versions

eslint: 8.0.0
@ijsto/eslint-config: 4.1.6

⚠️ UPDATE:

This issue is confirmed and is a composite issue which requires for a wider ecosystem support for ESLint v8.

We are aware of this, we will monitor and update the codebase to provide support to ESLint v8 as soon as it's possible.

Please see below for a tracker of the current progress (will be updated incrementally).

@ScottAgirs
Copy link
Contributor

Hello @rtritto thank you for reporting this, until early/mid November it may be a little bit tricky to get to this, but will look into this as soon as possible.

If anyone else is experiencing this issue, please add to this thread. 🙏🏼

@ScottAgirs ScottAgirs added the help wanted Extra attention is needed label Oct 11, 2021
@ahmadi-akbar
Copy link

+1 same here

i've no problem with eslint version 7.32.0
after update to version 8.0.0 i faced this error

version

eslint: ^8.0.0
@ijsto/eslint-config: ^4.0.6

Step to reproduce

yarn eslint ./**.js

result

yarn run v1.22.15
$ D:\p-next\node_modules\.bin\eslint .\src\

Oops! Something went wrong! :(

ESLint: 8.0.0

Error: Cannot read config file: D:\p-next\node_modules\@ijsto\eslint-config\index.js
Error: Failed to patch ESLint because the calling module was not recognized.
If you are using a newer ESLint version that may be unsupported, please create a GitHub issue:        
https://github.com/microsoft/rushstack/issues
Referenced from: D:\p-next\.eslintrc.js
    at Object.<anonymous> (D:\p-next\node_modules\@rushstack\eslint-patch\lib\modern-module-resolution.js:58:19)
    at Module._compile (D:\p-next\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (D:\p-next\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)    at Object.<anonymous> (D:\p-next\node_modules\@rushstack\eslint-patch\modern-module-resolution.js:1:63)
    at Module._compile (D:\p-next\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@ScottAgirs ScottAgirs added [CONFIRMED] Confirmed and needs to be fixed. and removed help wanted Extra attention is needed labels Oct 11, 2021
@ScottAgirs
Copy link
Contributor

ScottAgirs commented Oct 11, 2021

SOLUTION / TRACKER

To resolve this issue, we need to wait for the rest of the ecosystem to release support for ESLint V8.

## Progress Tracker

@rtritto
Copy link
Contributor Author

rtritto commented Oct 12, 2021

Support for ESLint v8 in eslint-plugin-import was relased in v2.25.0.

@ScottAgirs
Copy link
Contributor

Support for ESLint v8 eslint-plugin-import was relased in v2.25.0.

Thanks so much for the heads-up! Added to #11

@ScottAgirs
Copy link
Contributor

SOLUTION/TRACKER is updated with references.

@ScottAgirs ScottAgirs changed the title Eslint 8 compatibility ESLint v8 Support @ijsto/eslint-config Oct 16, 2021
@ScottAgirs
Copy link
Contributor

ScottAgirs commented Nov 10, 2021

The latest version 4.2.7 seems to have addressed the issue.

To update you can use

npx install-peerdeps --dev @ijsto/eslint-config@latest

If you run into any bug, please open a new issue and it will be addressed with a patch version.

@rtritto
Copy link
Contributor Author

rtritto commented Nov 10, 2021

After install (yarn add eslint @ijsto/eslint-config), I got:

➤ YN0060: │ test-eslint@workspace:. provides eslint (pf3766) with version 8.2.0, which doesn't satisfy what @ijsto/eslint-config and some of its descendants request
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code

yarn explain peer-requirements pf3766

➤ YN0000: test-eslint@workspace:. provides eslint@npm:8.2.0 with version 8.2.0, which doesn't satisfy the following requirements:

➤ YN0000: @ijsto/eslint-config@npm:4.2.7 [0f3ca]       → ^7.25.0 || ^8.0.0                                          ✓
➤ YN0000: eslint-config-airbnb-base@npm:14.2.1 [943ee] → ^5.16.0 || ^6.8.0 || ^7.2.0                                ✘
➤ YN0000: eslint-config-airbnb@npm:18.2.1 [41e81]      → ^5.16.0 || ^6.8.0 || ^7.2.0                                ✘
➤ YN0000: eslint-config-prettier@npm:8.3.0 [41e81]     → >=7.0.0                                                    ✓
➤ YN0000: eslint-plugin-es@npm:3.0.1 [9598e]           → >=4.19.1                                                   ✓
➤ YN0000: eslint-plugin-import@npm:2.25.3 [41e81]      → ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8                 ✓
➤ YN0000: eslint-plugin-jsx-a11y@npm:6.5.1 [41e81]     → ^3 || ^4 || ^5 || ^6 || ^7 || ^8                           ✓
➤ YN0000: eslint-plugin-node@npm:11.1.0 [41e81]        → >=5.16.0                                                   ✓
➤ YN0000: eslint-plugin-prettier@npm:4.0.0 [41e81]     → >=7.28.0                                                   ✓
➤ YN0000: eslint-plugin-react-hooks@npm:4.3.0 [41e81]  → ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 ✓
➤ YN0000: eslint-plugin-react@npm:7.27.0 [41e81]       → ^3 || ^4 || ^5 || ^6 || ^7 || ^8                           ✓

➤ YN0000: Note: these requirements start with @ijsto/eslint-config@npm:4.2.7 [0f3ca]

Plugins that need support to Eslint v8:

  • eslint-config-airbnb-base: should be updated to v15.0.0
  • eslint-config-airbnb: not yet released

FYI @ScottAgirs

@ScottAgirs
Copy link
Contributor

@rtritto thank you for reporting this. Strange, I cannot reproduce this on my end, could you please share your package.json?

If anyone else is experiencing same issue, please chime in

@ScottAgirs ScottAgirs reopened this Nov 11, 2021
@rtritto
Copy link
Contributor Author

rtritto commented Nov 11, 2021

My package.json only have eslint and @ijsto/eslint-config as dependencies.
eslint-config-airbnb v19.0.0 was released, simply update it in the package.json of @ijsto/eslint-config.
eslint-config-airbnb-base is a dependency of eslint-config-airbnb (already updated in v19.0.0).

@ScottAgirs
Copy link
Contributor

@rtritto thank you for your feedback and help, merged with 2f09294.

Cheers,
Closing for now.

@rtritto
Copy link
Contributor Author

rtritto commented Nov 11, 2021

@ScottAgirs I saw the commit, you should never change directly version of a dependency in package.json, you must use upgrade/update option command of the package manager (npm/yarn etc).
Please, delete yarn.lock and run yarn install to regenerate dependencies in the new yarn.lock.

@ScottAgirs
Copy link
Contributor

Hey @rtritto thanks again for the pointers - duly noted! I have few improvements in mind for this package, including proper semver release mechanism, that surely is no excuse not to do things in a proper way! :)

If you're open to contributing and suggesting some improvements, please ping me on twitter.com/scottagirs - would love to chat!

Also please feel free to open a PR, if you find any areas for improvements/fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[CONFIRMED] Confirmed and needs to be fixed.
Projects
None yet
Development

No branches or pull requests

3 participants