@f2e-spec-next/commitlint-config 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +20 -2
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/package.json +54 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Huangjunsen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @f2e-spec-next/commitlint-config
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
面向现代前端工程的 Commitlint 共享配置(纯 ESM),遵循 Conventional Commits 规范并友好支持中文提交描述。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add -D @commitlint/cli @f2e-spec-next/commitlint-config
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 使用
|
|
12
|
+
|
|
13
|
+
在 `package.json` 中声明:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"commitlint": {
|
|
18
|
+
"extends": ["@f2e-spec-next/commitlint-config"]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
```
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { UserConfig } from '@commitlint/types';
|
|
2
|
+
export declare const COMMIT_TYPES: readonly ["feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert"];
|
|
3
|
+
declare const config: UserConfig;
|
|
4
|
+
export default config;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,eAAO,MAAM,YAAY,yGAYf,CAAC;AAEX,QAAA,MAAM,MAAM,EAAE,UAgBb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const COMMIT_TYPES = [
|
|
2
|
+
'feat',
|
|
3
|
+
'fix',
|
|
4
|
+
'docs',
|
|
5
|
+
'style',
|
|
6
|
+
'refactor',
|
|
7
|
+
'perf',
|
|
8
|
+
'test',
|
|
9
|
+
'build',
|
|
10
|
+
'ci',
|
|
11
|
+
'chore',
|
|
12
|
+
'revert',
|
|
13
|
+
];
|
|
14
|
+
const config = {
|
|
15
|
+
parserPreset: 'conventional-changelog-conventionalcommits',
|
|
16
|
+
rules: {
|
|
17
|
+
'body-leading-blank': [1, 'always'],
|
|
18
|
+
'body-max-line-length': [2, 'always', 100],
|
|
19
|
+
'footer-leading-blank': [1, 'always'],
|
|
20
|
+
'footer-max-line-length': [2, 'always', 100],
|
|
21
|
+
'header-max-length': [2, 'always', 100],
|
|
22
|
+
'scope-case': [2, 'always', 'lower-case'],
|
|
23
|
+
'subject-case': [0],
|
|
24
|
+
'subject-empty': [2, 'never'],
|
|
25
|
+
'subject-full-stop': [2, 'never', '.'],
|
|
26
|
+
'type-case': [2, 'always', 'lower-case'],
|
|
27
|
+
'type-empty': [2, 'never'],
|
|
28
|
+
'type-enum': [2, 'always', [...COMMIT_TYPES]],
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
export default config;
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM;IACN,KAAK;IACL,MAAM;IACN,OAAO;IACP,UAAU;IACV,MAAM;IACN,MAAM;IACN,OAAO;IACP,IAAI;IACJ,OAAO;IACP,QAAQ;CACA,CAAC;AAEX,MAAM,MAAM,GAAe;IACzB,YAAY,EAAE,4CAA4C;IAC1D,KAAK,EAAE;QACL,oBAAoB,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC;QACnC,sBAAsB,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC;QAC1C,sBAAsB,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC;QACrC,wBAAwB,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC;QAC5C,mBAAmB,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC;QACvC,YAAY,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC;QACzC,cAAc,EAAE,CAAC,CAAC,CAAC;QACnB,eAAe,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC;QAC7B,mBAAmB,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC;QACtC,WAAW,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC;QACxC,YAAY,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC;QAC1B,WAAW,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC;KAC9C;CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,57 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@f2e-spec-next/commitlint-config",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "面向现代前端工程的 Commitlint 共享提交规范配置(纯 ESM)",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"commitlint",
|
|
7
|
+
"commitlint-config",
|
|
8
|
+
"conventional-commits",
|
|
9
|
+
"f2e-spec-next"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/huangjunsen0406/f2e-spec-next#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/huangjunsen0406/f2e-spec-next/issues"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/huangjunsen0406/f2e-spec-next.git",
|
|
18
|
+
"directory": "packages/commitlint-config"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"author": "Huangjunsen <951434130@qq.com>",
|
|
22
|
+
"type": "module",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.js"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"main": "./dist/index.js",
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"README.md"
|
|
34
|
+
],
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"conventional-changelog-conventionalcommits": "^9.3.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@commitlint/lint": "^20.4.4",
|
|
40
|
+
"@commitlint/load": "^20.4.4",
|
|
41
|
+
"@commitlint/types": "^20.4.4"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"@commitlint/cli": ">=19.0.0"
|
|
45
|
+
},
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=20.19.0"
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "tsc -p tsconfig.json",
|
|
54
|
+
"test": "vitest run",
|
|
55
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
56
|
+
}
|
|
6
57
|
}
|