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

Migrate linting git hook to lint-staged #178

Merged
merged 1 commit into from
Jan 11, 2024
Merged

Conversation

kieran-ryan
Copy link
Member

🤔 What's changed?

For the purposes of linting staged files

⚡️ What's your motivation?

Same as #93 applied to cucumber/language-server - to rectify failing pre-commit hook and migrate from pretty-quick - an unmaintained dependency - to lint-staged.

Unlike pretty-quick, lint-staged is preconfigured to run on staged changes by default; thus we do not require to specify it in our scripts, as it can simply run as npx lint-staged.

🏷️ What kind of change is this?

  • 🏦 Refactoring/debt/DX (improvement to code design, tooling, documentation etc. without changing behaviour)

♻️ Anything particular you want feedback on?

Any defaults of pretty-quick behaviour that are not covered by lint-staged.

To test, modify files in the src and test directories and run:

git add src test
npx lint-staged

You should observe an output similar to the following:

✔ Preparing lint-staged...
✔ Running tasks for staged files...
✔ Applying modifications from tasks...
✔ Cleaning up temporary files...

📋 Checklist:

@kieran-ryan kieran-ryan added the 🏦 debt Tech debt label Jan 10, 2024
@kieran-ryan kieran-ryan self-assigned this Jan 10, 2024
@binhtran432k binhtran432k merged commit 9ae8b77 into main Jan 11, 2024
@binhtran432k binhtran432k deleted the fix-pre-commit branch January 11, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏦 debt Tech debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants