@citizenplane/pimp 9.2.0 → 9.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -154,19 +154,57 @@ Run the tests!
154
154
  npm run test
155
155
  ```
156
156
 
157
- Then install husky and gitmoji to write your best commit message:
157
+ ### 📝 Commit Guidelines
158
+
159
+ This project follows [Conventional Commits](https://www.conventionalcommits.org/) specification. All commit messages are automatically validated.
160
+
161
+ #### Using Interactive Commit Tool
162
+
163
+ For an interactive commit experience that guides you through creating a proper commit message:
158
164
 
159
165
  ```bash
160
- npm i -g husky gitmoji-cli
166
+ git add .
167
+ npm run commit or git cz
161
168
  ```
162
169
 
163
- Add you changes and commit with
170
+ #### Manual Commit Format
171
+
172
+ If you prefer to write commit messages manually, follow this format:
173
+
174
+ ```
175
+ <type>: <description>
176
+ ```
177
+
178
+ **Available types:**
179
+
180
+ - `feat`: A new feature
181
+ - `fix`: A bug fix
182
+ - `docs`: Documentation changes
183
+ - `style`: Code style changes (formatting, etc.)
184
+ - `refactor`: Code refactoring
185
+ - `perf`: Performance improvements
186
+ - `test`: Adding or updating tests
187
+ - `chore`: Maintenance tasks
188
+ - `ci`: CI/CD changes
189
+ - `build`: Build system changes
190
+ - `revert`: Revert a previous commit
191
+
192
+ **Rules:**
193
+
194
+ - Keep the description under 48 characters
195
+ - Use lowercase for the description
196
+ - Don't end with a period
197
+
198
+ **Examples:**
164
199
 
165
200
  ```bash
166
- git add .
167
- git commit
201
+ git commit -m "feat: add new button component"
202
+ git commit -m "fix: resolve input validation issue"
203
+ git commit -m "docs: update installation guide"
168
204
  ```
169
205
 
206
+ The commit message will be automatically validated before the commit is accepted.
207
+
170
208
  ### 🏆 Step 6. Making your pull request
171
209
 
172
210
  To be done
@@ -0,0 +1,27 @@
1
+ export default {
2
+ extends: ['@commitlint/config-conventional'],
3
+ rules: {
4
+ // Limit subject length to 84 characters as requested
5
+ 'subject-max-length': [1, 'always', 84],
6
+ // Ensure subject is in lowercase
7
+ 'subject-case': [0, 'always', 'lower-case'],
8
+ // Allowed types according to conventional commits
9
+ 'type-enum': [
10
+ 2,
11
+ 'always',
12
+ [
13
+ 'feat', // new feature
14
+ 'fix', // bug fix
15
+ 'docs', // documentation
16
+ 'style', // formatting, missing semicolons, etc.
17
+ 'refactor', // code refactoring
18
+ 'perf', // performance improvements
19
+ 'test', // adding tests
20
+ 'chore', // maintenance tasks
21
+ 'ci', // continuous integration
22
+ 'build', // build system
23
+ 'revert', // revert commit
24
+ ],
25
+ ],
26
+ },
27
+ }