upleveled / eslint-config-upleveled

UpLeveled ESLint defaults for programming in JavaScript, TypeScript, React, Next.js, Node.js, Postgres.js
https://www.npmjs.com/package/eslint-config-upleveled
42 stars 12 forks source link

Add ESLint to install script to fix peer dependency conflicts #421

Closed ProchaLu closed 2 months ago

ProchaLu commented 2 months ago

This PR addresses the conflicting peer dependencies issue with ESLint. @ts-safeql/eslint-plugin currently depends on TypeScript ESLint 7.18.0, which requires ESLint 8.56.0. However, the latest version of ESLint is 9.9.1, resulting in conflicts when installing other packages that rely on the latest ESLint version.

 WARN  Issues with peer dependencies found
.
├─┬ @ts-safeql/eslint-plugin 3.4.1
│ └─┬ @typescript-eslint/utils 7.18.0
│   ├── ✕ missing peer eslint@^8.56.0
│   └─┬ @eslint-community/eslint-utils 4.4.0
│     └── ✕ missing peer eslint@"^6.0.0 || ^7.0.0 || >=8.0.0"
└─┬ eslint-config-flat-gitignore 0.3.0
  └── ✕ missing peer eslint@^9.5.0
✕ Conflicting peer dependencies:
  eslint  

To resolve this, ESLint is added to the devDependencies, ensuring compatibility and preventing peer dependency warnings or errors.

codesandbox-ci[bot] commented 2 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

karlhorky commented 2 months ago

Confirmed to remove the "✕ Conflicting peer dependencies" message when using the prerelease version eslint-config-upleveled@8.6.17-0:

$ pnpm upleveled-eslint-install
Detected project type: Next.js with PostgreSQL
Installing 8 ESLint config dependencies...
 WARN  6 deprecated subdependencies found: are-we-there-yet@2.0.0, gauge@3.0.2, glob@7.2.3, inflight@1.0.6, npmlog@5.0.1, rimraf@3.0.2
Packages: +194
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 637, reused 606, downloaded 0, added 194, done
node_modules/.pnpm/@launchql+protobufjs@7.2.6/node_modules/@launchql/protobufjs: Running postinstall script, done in 35ms
node_modules/.pnpm/libpg-query@15.2.0-rc.deparse.3_encoding@0.1.13/node_modules/libpg-query: Running install script, done in 18s

devDependencies:
+ @ts-safeql/eslint-plugin 3.4.1
+ @types/react 18.3.5
+ @types/react-dom 18.3.0
+ libpg-query 15.2.0-rc.deparse.3
+ prettier-plugin-embed 0.4.15
+ prettier-plugin-sql 0.18.1
+ stylelint 16.9.0
+ stylelint-config-upleveled 1.1.3

 WARN  Issues with peer dependencies found
.
├─┬ @ts-safeql/eslint-plugin 3.4.1
│ └─┬ @typescript-eslint/utils 7.18.0
│   └── ✕ unmet peer eslint@^8.56.0: found 9.10.0
└─┬ eslint-config-upleveled 8.6.17-0
  ├─┬ eslint-plugin-react-hooks 4.6.2
  │ └── ✕ unmet peer eslint@"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0": found 9.10.0
  └─┬ eslint-plugin-testing-library 6.3.0
    ├── ✕ unmet peer eslint@"^7.5.0 || ^8.0.0": found 9.10.0
    └─┬ @typescript-eslint/utils 5.62.0
      └── ✕ unmet peer eslint@"^6.0.0 || ^7.0.0 || ^8.0.0": found 9.10.0

Done in 22.7s
✅ Done installing dependencies
Copying config files...
Copied .vscode/settings.json
Skipping copy of eslint.config.js (file already exists)
Copied prettier.config.js (existing file overwritten)
Copied stylelint.config.js
Copied tsconfig.json (existing file overwritten)
✅ Done copying config files
Updating .gitignore...
✅ Done updating .gitignore
karlhorky commented 2 months ago

Published non-prerelease version eslint-config-upleveled@8.6.17