cucumber / language-service

Cucumber Language Service
MIT License
18 stars 27 forks source link

Migrate linting git hook to lint-staged #178

Closed kieran-ryan closed 10 months ago

kieran-ryan commented 10 months ago

🤔 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?

♻️ 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: