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

feat(eslint-plugin): support Eslint 9 and 8 simultaneously #7072

Open
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

JerryWu1234
Copy link
Contributor

@JerryWu1234 JerryWu1234 commented Nov 19, 2024

#6048

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests / types / typos
  • Infra

Description

Checklist

  • My code follows the developer guidelines of this project
  • I performed a self-review of my own code
  • I added a changeset with pnpm change
  • I made corresponding changes to the Qwik docs
  • I added new tests to cover the fix / functionality

Copy link

changeset-bot bot commented Nov 19, 2024

🦋 Changeset detected

Latest commit: aa1d5fb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
eslint-plugin-qwik Major
@builder.io/qwik Major
@builder.io/qwik-city Major
create-qwik Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Nov 19, 2024

Open in Stackblitz

npm i https://pkg.pr.new/@builder.io/qwik@7072
npm i https://pkg.pr.new/@builder.io/qwik-city@7072
npm i https://pkg.pr.new/eslint-plugin-qwik@7072
npm i https://pkg.pr.new/create-qwik@7072

commit: 3a5aae2

Copy link
Contributor

github-actions bot commented Nov 27, 2024

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview 88efe1b

@JerryWu1234 JerryWu1234 marked this pull request as ready for review November 28, 2024 01:22
@JerryWu1234 JerryWu1234 requested a review from a team as a code owner November 28, 2024 01:22
@wmertens wmertens changed the title feat: ensure eslint-plugin-qwink support Eslint 9 and 8 simultaneously feat(eslint-plugin): support Eslint 9 and 8 simultaneously Dec 10, 2024
Copy link
Member

@wmertens wmertens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we can have a test where it is installed with eslint V8 and tested, and also with V9 and tested?

@JerryWu1234 JerryWu1234 force-pushed the 6048_eslint-flag branch 2 times, most recently from de7afde to 939f856 Compare December 12, 2024 01:48
@JerryWu1234
Copy link
Contributor Author

JerryWu1234 commented Dec 12, 2024

Do you think we can have a test where it is installed with eslint V8 and tested, and also with V9 and tested?

Both methods use a different export method. For RuleTester, the only difference between ESLint 8 and ESLint 9 is the argument format.

@JerryWu1234
Copy link
Contributor Author

The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.

RUN v2.0.5 /home/runner/work/qwik/qwik/e2e/qwik-cli-e2e

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: my-qwik-basic-starter@undefined
npm error Found: @types/[email protected]
npm error node_modules/@types/eslint
npm error dev @types/eslint@"8.56.10" from the root project
npm error
npm error Could not resolve dependency:
npm error peer @types/eslint@"9.6.1" from [email protected]
npm error node_modules/eslint-plugin-qwik
npm error dev eslint-plugin-qwik@"file:/home/runner/work/qwik/qwik/temp/tarballs/eslint-plugin-qwik-1.12.0.tgz" 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/runner/.npm/_logs/2024-12-31T07_59_47_444Z-eresolve-report.txt
npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2024-12-31T07_59_47_444Z-debug-0.log
stdout | tests/serve.spec.ts
E2E: Created test application at "/tmp/qwik_e2e-2057-9EI1Zw8P3IeC/e2e-app"
E2E: Removing tmp dir "/tmp/qwik_e2e-2057-9EI1Zw8P3IeC"

❯ tests/serve.spec.ts (1 test) 2958ms

⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯

FAIL tests/serve.spec.ts [ tests/serve.spec.ts ]
Error: Command failed: npm i
❯ replacePackagesWithLocalOnes utils/index.ts:70:3
68| patchPackageJsonForPlugin(tmpDir, name, absolutePath);
69| }
70| execSync('npm i', {
| ^
71| cwd: tmpDir,
72| // only output errors
❯ Module.scaffoldQwikProject utils/index.ts:22:5
❯ tests/serve.spec.ts:16:18

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯

Test Files 1 failed (1)
Tests (1)
Start at 07:59:44
Duration 5.99s (transform 71ms, setup 2.85s, collect 10ms, tests 2.96s, environment 0ms, prepare 63ms)

Error: Error: Command failed: npm i
❯ replacePackagesWithLocalOnes utils/index.ts:70:3
❯ Module.scaffoldQwikProject utils/index.ts:22:5
❯ tests/serve.spec.ts:16:18

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { status: 1, signal: null, output: [ null, null, null ], pid: 2129, stdout: null, stderr: null }

/home/runner/work/qwik/qwik/e2e/qwik-cli-e2e:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  qwik-cli-e2e@ e2e: vitest run --config=vite.config.ts
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.
Error: Process completed with exit code 1.

execSync('npm i', change into pnpm i can fix this problem ,so I modify 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

Successfully merging this pull request may close these issues.

3 participants