codeforboston / codeforboston/cliff-effects
pre-commit hooks: remove 'lint-staged' and carets?
- Dominant language
- JavaScript
- Stars
- 30
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
About the awesome changes merged in #904.
1. The 'lint-staged' package doesn't actually limit npm lint fixes to just staged files. It changes the files, though it doesn't add them. Considering this will be in everyone's code and all files will be linted when committed and there shouldn't be leftover files to lint, it shouldn't be a problem either way, but we might consider getting rid of 'lint-staged'.
2. We'd agreed not to have carets in version numbers to try to stabilize our package-lock.json. Hasn't worked, but carats my confuse further efforts.
On other, less crucial notes, just so they're in the record:
3. Right now it prints console logs when it does its thing, which might make newer folks nervous. There's [currently no way to turn that off](https://github.com/typicode/husky/pull/300). Personally, I do generally go for explicit over implicit, but I'm not sure about this specific situation since it'll be happening right at the start. Depending on the outcome of the discussion, we could make a PR on [husky's repo](https://github.com/typicode/husky).
4. It's strange how it can make a commit even if the linting is the only thing that happened. I ruined some code format and made a commit just for that. After linting, there were no changes and it still committed. I wonder how it does that.
Contributor guide
No contributing guide indexed for this repository
Research direction
Review the pre-commit setup and package-lock changes introduced by #904, then compare the lint-staged behavior and dependency version constraints described here. Done means the maintainers have decided the scope for removing lint-staged and carets and have addressed the noted console output and lint-only commit behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- developer-experience, tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100