From f57f9a68728b2932962d4f68361b473e0f7cd591 Mon Sep 17 00:00:00 2001 From: daixihegu Date: Thu, 25 Jun 2026 10:29:08 +0800 Subject: [PATCH] docs: improve developer documentation and fix markdown formatting --- DEV-README.md | 14 +++++++++++--- docs/contributing.md | 6 +++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/DEV-README.md b/DEV-README.md index 2e13cd8e..392fae63 100644 --- a/DEV-README.md +++ b/DEV-README.md @@ -2,10 +2,18 @@ After cloning the repository, set up the pre-commit hook by running the following commands: -`git config --unset core.hooksPath` -To reset the hooks config to git default +First, reset the hooks config to git default: + +```sh +git config --unset core.hooksPath +``` + +Then create and configure the pre-commit hook: ```sh touch .git/hooks/pre-commit chmod +x .git/hooks/pre-commit -echo '#!/bin/sh\nnode scripts/check-changes.js' > .git/hooks/pre-commit \ No newline at end of file +echo '#!/bin/sh\nnode scripts/check-changes.js' > .git/hooks/pre-commit +``` + +This hook will run checks before each commit to ensure code quality. \ No newline at end of file diff --git a/docs/contributing.md b/docs/contributing.md index 8ba1bda1..4f7a2319 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -20,7 +20,7 @@ Development In order to develop Solhint, you'll need: - [Git](https://git-scm.com/) -- [Node.js](https://nodejs.org/) +- [Node.js](https://nodejs.org/) (version 20 or higher) ### Getting Started @@ -48,6 +48,10 @@ passing. If you contribute with a new feature, please add tests for it. To run t $ npm test +### Setting up Git Hooks + +For information on setting up pre-commit hooks, please refer to [DEV-README.md](../DEV-README.md). + Pull Requests -------------