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(CLI): enable linting of cli unit test code #1420

Open
spirulence opened this issue Dec 19, 2024 · 0 comments
Open

feat(CLI): enable linting of cli unit test code #1420

spirulence opened this issue Dec 19, 2024 · 0 comments

Comments

@spirulence
Copy link
Contributor

spirulence commented Dec 19, 2024

Issue Description

Select one of:
[ ] Generated codemod is not correct
[ ] Bug in Codemod Studio
[ ] UI/UX improvement request
[X] Feature request

pnpm lint-staged, which is used in pre-commit hooks and in CI, does not seem to catch linting issues in unit tests in the CLI app. I'd like to improve this by enabling linting of unit tests going forward. There aren't too many unit test files right now, so it's a good time for that.

Here's a motivating example where linting did not catch a couple of unused variables in unit test code.

@mohab-sameh I got caught off-guard here by the fact that `pnpm lint-staged` did not catch my unused variables in testing! nice catch. may be room for improvement there.

Originally posted by @spirulence in #1408 (comment)

Steps to Reproduce

  1. Navigate to the CLI folder - apps/cli
  2. Make a change in a unit test source file that should fail linting, like adding an unused variable or incorrect formatting
  3. Stage the change in Git
  4. Run pnpm lint-staged

Actual Results

The linter reports no errors.

Expected Results

The linter should report an error and pnpm lint-staged should return a failure exit code.

Technical details

  • NodeJS 20
@spirulence spirulence changed the title cli: enable linting of unit test code [codemod] enable linting of cli unit test code Dec 19, 2024
@alexbit-codemod alexbit-codemod changed the title [codemod] enable linting of cli unit test code feat(CLI): enable linting of cli unit test code Dec 19, 2024
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

No branches or pull requests

1 participant