Skip to content

Repo(eslint-plugin): resolve remaining issues from vitest migration #11099

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

Open
10 tasks done
aryaemami59 opened this issue Apr 24, 2025 · 0 comments · May be fixed by #11100
Open
10 tasks done

Repo(eslint-plugin): resolve remaining issues from vitest migration #11099

aryaemami59 opened this issue Apr 24, 2025 · 0 comments · May be fixed by #11100
Labels
accepting prs Go ahead, send a pull request that resolves this issue repo maintenance things to do with maintenance of the repo, and not with code/docs

Comments

@aryaemami59
Copy link
Contributor

aryaemami59 commented Apr 24, 2025

Suggestion

Post-Vitest Migration: Fixes & Improvements

  • Use the @nx/vite:test executor in project.json to align with other workspaces.
  • Fix path-related issues that cause vitest --project=eslint-plugin to fail.
  • Replace .each with the new .for syntax to allow running the tests concurrently via vitest --sequence.concurrent=true, which does speed up local testing.
  • Replace fs with fs/promises to take advantage of vitest’s better support for async/ESM code (vs. jest's preference for sync/CJS).
  • Remove the manual __dirname in docs.test.mts. vitest backports import.meta.dirname, import.meta.filename as well as import.meta.resolve() for older versions of Node.js.
  • Convert manually thrown errors in unit tests to standard vitest assertions.
  • Fix issue related to invalidCases in no-unnecessary-template-expression.test.ts.
  • Refactor remaining loops to use .for syntax.
  • Add a test-single target to project.json.
  • Correct the outDir path in tsconfig.spec.json.

Additional Info

I will submit a draft PR for this shortly.

@aryaemami59 aryaemami59 added repo maintenance things to do with maintenance of the repo, and not with code/docs triage Waiting for team members to take a look labels Apr 24, 2025
@kirkwaiblinger kirkwaiblinger added accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for team members to take a look labels Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting prs Go ahead, send a pull request that resolves this issue repo maintenance things to do with maintenance of the repo, and not with code/docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants