@abelspithost/commitlint 0.0.2 → 0.1.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
@@ -1,12 +1,14 @@
1
1
  # @abelspithost/commitlint
2
2
 
3
- A shared [commitlint](https://commitlint.js.org/) preset that extends `@commitlint/config-conventional` with stricter defaults, plus a CLI to set everything up in one command.
3
+ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=aspithost_commitlint&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=aspithost_commitlint)
4
+
5
+ A shared [commitlint](https://commitlint.js.org/) preset that extends `@commitlint/config-conventional` with stricter defaults, plus a CLI to set everything up with one command.
4
6
 
5
7
  ## What's included
6
8
 
7
9
  - Commitlint configuration that extends `@commitlint/config-conventional`
8
10
  - Scope is optional by default
9
- - A `createConfig` helper to customize allowed types and scopes (providing scopes makes them mandatory)
11
+ - A `createConfig` helper to customize allowed types and scopes (when you provide scopes, they become mandatory)
10
12
  - An `init` CLI that installs and configures commitlint + husky automatically
11
13
  - Automatic package manager detection (npm, yarn, pnpm, bun)
12
14
 
@@ -18,17 +20,17 @@ Run the init command in your project root:
18
20
  npx -p @abelspithost/commitlint init
19
21
  ```
20
22
 
21
- The CLI automatically detects your package manager by looking for `bun.lockb`/`bun.lock`, `pnpm-lock.yaml`, `yarn.lock`, or falling back to npm. It will:
23
+ The CLI detects your package manager by looking for `bun.lockb`/`bun.lock`, `pnpm-lock.yaml`, `yarn.lock`, or falling back to npm. It will:
22
24
 
23
25
  1. Install `husky`, `@commitlint/cli`, and `@abelspithost/commitlint` as dev dependencies
24
26
  2. Initialize husky
25
- 3. Remove the default `pre-commit` hook created by husky
27
+ 3. Remove the default `pre-commit` hook that husky creates
26
28
  4. Create a `.husky/commit-msg` hook (using the correct runner for your package manager)
27
- 5. Generate a `commitlint.config.ts` that re-exports the preset (skipped if one already exists)
29
+ 5. Generate a `commitlint.config.ts` that re-exports the preset (skip if one already exists)
28
30
 
29
31
  ## Manual setup (npm)
30
32
 
31
- Install the dependencies:
33
+ Install the required dependencies:
32
34
 
33
35
  ```sh
34
36
  npm install --save-dev husky @commitlint/cli @abelspithost/commitlint
@@ -71,7 +73,7 @@ export default createConfig({
71
73
  | `scopes` | `string[]` | — | Restrict commits to these scopes (makes scope mandatory) |
72
74
  | `types` | `string[]` | `COMMIT_TYPES` | Override the allowed commit types |
73
75
 
74
- When `scopes` is omitted, scope is optional and any value is accepted. When `scopes` is provided, a scope becomes **required** and must be one of the listed values. When `types` is omitted, it defaults to the built-in `COMMIT_TYPES`.
76
+ When you omit `scopes`, scope is optional and you can use any value. When you provide `scopes`, scope becomes **required** and must match one of the listed values. When you omit `types`, it defaults to the built-in `COMMIT_TYPES`.
75
77
 
76
78
  ### Examples
77
79
 
@@ -113,11 +115,11 @@ const configuration: UserConfig = {
113
115
  export default configuration;
114
116
  ```
115
117
 
116
- `RuleConfigSeverity` and `UserConfig` are re-exported from this package so you don't need to install `@commitlint/types` separately.
118
+ This package re-exports `RuleConfigSeverity` and `UserConfig`, so you don't need to install `@commitlint/types` separately.
117
119
 
118
120
  ## Commit message format
119
121
 
120
- Commits must follow the [Conventional Commits](https://www.conventionalcommits.org/) format:
122
+ Write your commits in the [Conventional Commits](https://www.conventionalcommits.org/) format:
121
123
 
122
124
  ```
123
125
  type: description
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { RuleConfigSeverity, type UserConfig } from '@commitlint/types';
2
- export { COMMIT_TYPES } from './constants/commitTypes.js';
3
2
  export { configuration, configuration as default, createConfig } from './config/config.js';
3
+ export { COMMIT_TYPES } from './constants/commitTypes.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,aAAa,IAAI,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAAE,aAAa,EAAE,aAAa,IAAI,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export { RuleConfigSeverity } from '@commitlint/types';
2
- export { COMMIT_TYPES } from './constants/commitTypes.js';
3
2
  export { configuration, configuration as default, createConfig } from './config/config.js';
3
+ export { COMMIT_TYPES } from './constants/commitTypes.js';
4
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAmB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,aAAa,IAAI,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAmB,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAAE,aAAa,EAAE,aAAa,IAAI,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abelspithost/commitlint",
3
- "version": "0.0.2",
3
+ "version": "0.1.0",
4
4
  "description": "Shared commitlint preset extending @commitlint/config-conventional with stricter defaults",
5
5
  "keywords": [
6
6
  "commitlint",
@@ -39,8 +39,11 @@
39
39
  "dist"
40
40
  ],
41
41
  "scripts": {
42
- "build": "npm run clean && tsc -p tsconfig.build.json",
42
+ "build": "npm run clean && npm run typecheck && tsc -p tsconfig.build.json && npm run deps:check",
43
43
  "clean": "rimraf dist",
44
+ "deps:check": "npx -y npm-check-updates --cooldown 2",
45
+ "deps:update": "npx -y npm-check-updates -u --target minor --cooldown 2 && npm install",
46
+ "deps:update:major": "npx -y npm-check-updates -u --cooldown 2 && npm install",
44
47
  "lint": "eslint .",
45
48
  "test:unit": "vitest",
46
49
  "test:cov": "vitest run --coverage --coverage.reporter=text",
@@ -48,22 +51,22 @@
48
51
  "prepare": "husky || true"
49
52
  },
50
53
  "dependencies": {
51
- "@commitlint/config-conventional": "^20.4.1",
52
- "@commitlint/format": "^20.4.0",
53
- "@commitlint/types": "^20.4.0"
54
+ "@commitlint/config-conventional": "^21.0.1",
55
+ "@commitlint/format": "^21.0.1",
56
+ "@commitlint/types": "^21.0.1"
54
57
  },
55
58
  "devDependencies": {
56
- "@abelspithost/eslint-config-ts": "^0.1.3",
57
- "@abelspithost/tsconfig-node": "^0.0.4",
58
- "@commitlint/cli": "^20.4.1",
59
- "@types/node": "^24.10.11",
60
- "@vitest/coverage-v8": "^4.0.18",
61
- "commitlint": "^20.4.1",
62
- "eslint": "^9.39.2",
59
+ "@abelspithost/eslint-config-ts": "^1.1.0",
60
+ "@abelspithost/tsconfig-node": "^0.0.5",
61
+ "@commitlint/cli": "^21.0.1",
62
+ "@types/node": "^24.12.4",
63
+ "@vitest/coverage-v8": "^4.1.6",
64
+ "commitlint": "^21.0.1",
65
+ "eslint": "^10.4.0",
63
66
  "husky": "^9.1.7",
64
- "jiti": "^2.6.1",
65
- "rimraf": "^6.1.2",
66
- "typescript": "^5.9.3",
67
- "vitest": "^4.0.18"
67
+ "jiti": "^2.7.0",
68
+ "rimraf": "^6.1.3",
69
+ "typescript": "^6.0.3",
70
+ "vitest": "^4.1.6"
68
71
  }
69
72
  }