@kriac/commitlint-config 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/dist/index.cjs +61 -0
- package/dist/index.d.cts +16 -0
- package/dist/index.d.mts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.mjs +59 -0
- package/package.json +39 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const czg = require('czg');
|
|
4
|
+
|
|
5
|
+
const types = [
|
|
6
|
+
{
|
|
7
|
+
name: "feat: \u65B0\u529F\u80FD",
|
|
8
|
+
value: "feat"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: "fix: \u4FEE\u590D\u95EE\u9898",
|
|
12
|
+
value: "fix"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: "style: \u98CE\u683C\u6539\u52A8",
|
|
16
|
+
value: "style"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "performance: \u6027\u80FD\u4F18\u5316",
|
|
20
|
+
value: "perf"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "refactor: \u4EE3\u7801\u91CD\u6784",
|
|
24
|
+
value: "refactor"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "test: \u6D4B\u8BD5\u4EE3\u7801",
|
|
28
|
+
value: "test"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: "documentation: \u6587\u6863",
|
|
32
|
+
value: "docs"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "chore: \u6742\u9879/\u5DE5\u7A0B\u4F9D\u8D56",
|
|
36
|
+
value: "chore"
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
const typeValues = types.map((item) => {
|
|
40
|
+
return item.value;
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
function index(opts) {
|
|
44
|
+
return czg.defineConfig({
|
|
45
|
+
// 提交类型
|
|
46
|
+
types,
|
|
47
|
+
// 提交作用域
|
|
48
|
+
scopes: opts?.scopes || [],
|
|
49
|
+
// 跳过问题
|
|
50
|
+
skipQuestions: ["body", "breaking", "footerPrefix", "footer"],
|
|
51
|
+
// 自定义规则
|
|
52
|
+
rules: {
|
|
53
|
+
// 必须要定义类型
|
|
54
|
+
"type-empty": [2, "never"],
|
|
55
|
+
// 类型必须在枚举范围内
|
|
56
|
+
"type-enum": [2, "always", typeValues]
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
module.exports = index;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as czg from 'czg';
|
|
2
|
+
|
|
3
|
+
/** 可选项 */
|
|
4
|
+
interface Optional {
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
/** 插件选项 */
|
|
9
|
+
interface PluginOptions {
|
|
10
|
+
/** 扩展作用域 */
|
|
11
|
+
scopes?: Optional[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare function export_default(opts?: PluginOptions): czg.UserConfig;
|
|
15
|
+
|
|
16
|
+
export = export_default;
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as czg from 'czg';
|
|
2
|
+
|
|
3
|
+
/** 可选项 */
|
|
4
|
+
interface Optional {
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
/** 插件选项 */
|
|
9
|
+
interface PluginOptions {
|
|
10
|
+
/** 扩展作用域 */
|
|
11
|
+
scopes?: Optional[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare function export_default(opts?: PluginOptions): czg.UserConfig;
|
|
15
|
+
|
|
16
|
+
export { export_default as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as czg from 'czg';
|
|
2
|
+
|
|
3
|
+
/** 可选项 */
|
|
4
|
+
interface Optional {
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
/** 插件选项 */
|
|
9
|
+
interface PluginOptions {
|
|
10
|
+
/** 扩展作用域 */
|
|
11
|
+
scopes?: Optional[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare function export_default(opts?: PluginOptions): czg.UserConfig;
|
|
15
|
+
|
|
16
|
+
export = export_default;
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { defineConfig } from 'czg';
|
|
2
|
+
|
|
3
|
+
const types = [
|
|
4
|
+
{
|
|
5
|
+
name: "feat: \u65B0\u529F\u80FD",
|
|
6
|
+
value: "feat"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
name: "fix: \u4FEE\u590D\u95EE\u9898",
|
|
10
|
+
value: "fix"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: "style: \u98CE\u683C\u6539\u52A8",
|
|
14
|
+
value: "style"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "performance: \u6027\u80FD\u4F18\u5316",
|
|
18
|
+
value: "perf"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "refactor: \u4EE3\u7801\u91CD\u6784",
|
|
22
|
+
value: "refactor"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "test: \u6D4B\u8BD5\u4EE3\u7801",
|
|
26
|
+
value: "test"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "documentation: \u6587\u6863",
|
|
30
|
+
value: "docs"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "chore: \u6742\u9879/\u5DE5\u7A0B\u4F9D\u8D56",
|
|
34
|
+
value: "chore"
|
|
35
|
+
}
|
|
36
|
+
];
|
|
37
|
+
const typeValues = types.map((item) => {
|
|
38
|
+
return item.value;
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
function index(opts) {
|
|
42
|
+
return defineConfig({
|
|
43
|
+
// 提交类型
|
|
44
|
+
types,
|
|
45
|
+
// 提交作用域
|
|
46
|
+
scopes: opts?.scopes || [],
|
|
47
|
+
// 跳过问题
|
|
48
|
+
skipQuestions: ["body", "breaking", "footerPrefix", "footer"],
|
|
49
|
+
// 自定义规则
|
|
50
|
+
rules: {
|
|
51
|
+
// 必须要定义类型
|
|
52
|
+
"type-empty": [2, "never"],
|
|
53
|
+
// 类型必须在枚举范围内
|
|
54
|
+
"type-enum": [2, "always", typeValues]
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { index as default };
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kriac/commitlint-config",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "@kriac/commitlint-config",
|
|
6
|
+
"author": "Kriac",
|
|
7
|
+
"homepage": "https://github.com/Kriac/lint-kit",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/Kriac/lint-kit.git"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"commitlint",
|
|
14
|
+
"commitlint config"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"lint": "vue-tsc -b --noEmit",
|
|
18
|
+
"build": "unbuild",
|
|
19
|
+
"release": "npm publish --access public"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"czg": "1.12.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"unbuild": "3.6.1",
|
|
26
|
+
"vue-tsc": "3.2.1"
|
|
27
|
+
},
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"files": [
|
|
30
|
+
"dist"
|
|
31
|
+
],
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"import": "./dist/index.mjs",
|
|
36
|
+
"require": "./dist/index.cjs"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|