You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/src/pages/community/contributing.js
+68Lines changed: 68 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -103,6 +103,16 @@ export default function Contributing() {
103
103
<div>
104
104
<h4>Test</h4>
105
105
<p>Run tests and ensure your changes don't break existing functionality.</p>
106
+
<divclassName={styles.stepNumberTips}>
107
+
<p>1. Run precommit hooks, ensure compliance with the project submission guidelines;</p>
108
+
<p>
109
+
2. You can refer to
110
+
{' '}
111
+
<ahref="/docs/getting-started/installation">Install the local</a>
112
+
{' '}
113
+
to start semantic-router locally.
114
+
</p>
115
+
</div>
106
116
</div>
107
117
</div>
108
118
@@ -117,6 +127,64 @@ export default function Contributing() {
117
127
</div>
118
128
</section>
119
129
130
+
<sectionclassName={styles.section}>
131
+
<h2>⚙️ Precommit hooks</h2>
132
+
<p>The Semantic-router project provides a precommit hook to standardize the entire project, including Go, Python, Rust, Markdown, and spelling error checking.</p>
133
+
<p>Although these measures may increase the difficulty of contributions, they are necessary. We are currently building a portable Docker precommit environment to reduce the difficulty of contributions, allowing you to focus on functional pull requests.</p>
134
+
135
+
<divclassName={styles.card}>
136
+
<h3>Manual</h3>
137
+
138
+
<h4>Some Tips: </h4>
139
+
<divclassName={styles.stepNumberTips}>
140
+
<p>1. If the precommit check fails, don't worry. You can also get more information by executing "make help". </p>
141
+
<p>2. For the pip installation tool, we recommend that you use venv for installation.</p>
142
+
<p>3. You can also directly submit the PR and let GitHub CI test it for you, but this will take a lot of time!</p>
143
+
</div>
144
+
145
+
<divclassName={styles.steps}>
146
+
<divclassName={styles.step}>
147
+
<spanclassName={styles.stepNumber}>1</span>
148
+
<div>
149
+
<h4>Install precommit</h4>
150
+
<p>Run pip install --user precommit</p>
151
+
</div>
152
+
</div>
153
+
<divclassName={styles.step}>
154
+
<spanclassName={styles.stepNumber}>2</span>
155
+
<div>
156
+
<h4>Install check tools</h4>
157
+
<divclassName={styles.stepNumberTips}>
158
+
<p>Markdown: npm install -g markdownlint-cli</p>
159
+
<p>Yaml: pip install --user yamllint</p>
160
+
<p>CodeSpell: pip install --user codespell</p>
161
+
<p>JavaScript: cd website &&npmlint</p>
162
+
</div>
163
+
</div>
164
+
</div>
165
+
<divclassName={styles.step}>
166
+
<spanclassName={styles.stepNumber}>3</span>
167
+
<div>
168
+
<h4>Install precommit to git</h4>
169
+
<p>Run pre-commit install, then pre-commit installed at .git/hooks/pre-commit</p>
0 commit comments