Skip to content

Pre-commit hooks need more documentation #289

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
garloff opened this issue Jan 23, 2025 · 2 comments
Open

Pre-commit hooks need more documentation #289

garloff opened this issue Jan 23, 2025 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@garloff
Copy link
Member

garloff commented Jan 23, 2025

As mentioned in #287 (comment) (point 4), commits are not working without further work.
(a) https://docs.scs.community/community/contribute/linting-guide/ says that husky, prettier and markdownlint-cli2 are being used. Following the links and following the install instructions means installing npm install --save-dev husky (which is harmless), npm install --save-dev --save-exact prettier (which pulls in a few dozen dependencies and may not be as harmless) and npm install --save-dev markdownlint-cli2 (not exatcly harmless either) . Explicitly mentioning that those two npm packages need to be installed (maybe best into a container) would be good.
(b) It still does not work as is, as the docs repo has this

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

in .husky/pre-commit
This file does not exist in git. I created an empty one to make commits work, but this is likely not how it's supposed to be done ...

@garloff garloff added the documentation Improvements or additions to documentation label Jan 23, 2025
@garloff
Copy link
Member Author

garloff commented Jan 23, 2025

Ah nice, the pre-commit file hides its last line due to a missing linebreak

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged

@garloff
Copy link
Member Author

garloff commented Jan 23, 2025

Oh, and while I can find and install markdownlint-cli2, this is not the case for markdownlint-cli2-fix, which the node index nor even google seems to know ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants