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

fix!: correct the peer dependency requirement of the AirBnB React config #20

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

Kenneth-Sills
Copy link
Owner

This was meant to be the latest version, but the base and React configs appear to be out of sync and I mistakenly assumed they would be the same. As always, assumptions are the root of all evil.

While Airbnb <= 19 did not support ESLint 8, this was not specified in the project dependencies so conflict resolution would NOT prevent us from being installed alongside Airbnb 15. Subsequently, this is being marked as a breaking change since it could technically cause a working downstream project to cross major version boundaries.

Closes #19

This was meant to be the latest version, but the base and React configs appear
to  be out of sync and I mistakenly assumed they would be the same. As always,
assumptions are the root of all evil.

While Airbnb <= 19 did not support ESLint 8, this was not specified in the
project dependencies so conflict resolution would NOT prevent us from being
installed alongside Airbnb 15. Subsequently, this is being marked as a breaking
change since it could *technically* cause a working downstream project to cross
major version boundaries.

Closes #19
@Kenneth-Sills
Copy link
Owner Author

Confirmed that the existing trunk does not install correctly with the React config:

Click to Open

❯ npm install -D @kesills/eslint-config-airbnb-typescript eslint-config-airbnb
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/eslint
npm error   peer eslint@"^8.57.0" from @kesills/[email protected]
npm error   node_modules/@kesills/eslint-config-airbnb-typescript
npm error     dev @kesills/eslint-config-airbnb-typescript@"*" from the root project
npm error   peer eslint@">=8.40.0" from @stylistic/[email protected]
npm error   node_modules/@stylistic/eslint-plugin
npm error     peer @stylistic/eslint-plugin@"^2.6.1" from @kesills/[email protected]
npm error     node_modules/@kesills/eslint-config-airbnb-typescript
npm error       dev @kesills/eslint-config-airbnb-typescript@"*" from the root project
npm error   7 more (@typescript-eslint/eslint-plugin, ...)
npm error
npm error Could not resolve dependency:
npm error peer eslint@"^3.19.0 || ^4.3.0" from [email protected]
npm error node_modules/eslint-config-airbnb
npm error   dev eslint-config-airbnb@"*" from the root project
npm error   peerOptional eslint-config-airbnb@"^15.0.0" from @kesills/[email protected]
npm error   node_modules/@kesills/eslint-config-airbnb-typescript
npm error     dev @kesills/eslint-config-airbnb-typescript@"*" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/eslint
npm error   peer eslint@"^3.19.0 || ^4.3.0" from [email protected]
npm error   node_modules/eslint-config-airbnb
npm error     dev eslint-config-airbnb@"*" from the root project
npm error     peerOptional eslint-config-airbnb@"^15.0.0" from @kesills/[email protected]
npm error     node_modules/@kesills/eslint-config-airbnb-typescript
npm error       dev @kesills/eslint-config-airbnb-typescript@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /home/kesills/.npm/_logs/2024-09-16T22_12_21_949Z-eresolve-report.txt
npm error A complete log of this run can be found in: /home/kesills/.npm/_logs/2024-09-16T22_12_21_949Z-debug-0.log

Confirmed that this branch installs correctly:

Click to Open

❯ npm install -D "[email protected]:Kenneth-Sills/eslint-config-airbnb-typescript.git#kesills-19-aiwrong-airbnb-version" eslint-config-airbnb
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead

added 280 packages, and audited 281 packages in 9s

115 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Creating a stub eslint.config.js and tsconfig.json, runs work as expected:

Click to Open

❯ npx eslint .      
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=4.7.4 <5.6.0

YOUR TYPESCRIPT VERSION: 5.6.2

Please only submit bug reports when using the officially supported version.

=============
Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.

/home/kesills/Documents/tmp/bar/eslint.config.js
  1:1  error  '@eslint/eslintrc' should be listed in the project's dependencies, not devDependencies  import/no-extraneous-dependencies

✖ 1 problem (1 error, 0 warnings)

(Yes, those are fine.)

@Kenneth-Sills Kenneth-Sills merged commit b22bb83 into main Sep 16, 2024
1 check passed
@Kenneth-Sills Kenneth-Sills deleted the kesills-19-aiwrong-airbnb-version branch September 16, 2024 22:22
Copy link

🎉 This issue has been resolved in version 20.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Kenneth-Sills
Copy link
Owner Author

Both confirmations repeated post-release, looks good.

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

Successfully merging this pull request may close these issues.

peerDependencies includes eslint-config-airbnb@^15, much older than the current 19.0.4
1 participant