commitlint-plugin-function-rules 1.5.0 → 1.6.1
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/{src/function-rule.d.ts → function-rule.d.ts} +0 -0
- package/dist/function-rule.js +13 -0
- package/dist/{src/index.d.ts → index.d.ts} +0 -0
- package/dist/{src/index.js → index.js} +1 -0
- package/dist/{src/rules.d.ts → rules.d.ts} +0 -0
- package/dist/{src/rules.js → rules.js} +1 -0
- package/package.json +47 -29
- package/dist/src/function-rule.js +0 -9
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const functionRule = (parsed, when = 'always', functionRule) => {
|
|
4
|
+
if (functionRule === undefined) {
|
|
5
|
+
return [true];
|
|
6
|
+
}
|
|
7
|
+
if (typeof functionRule !== 'function') {
|
|
8
|
+
throw new Error('Not a valid function!');
|
|
9
|
+
}
|
|
10
|
+
return functionRule(parsed, when);
|
|
11
|
+
};
|
|
12
|
+
exports.default = functionRule;
|
|
13
|
+
//# sourceMappingURL=function-rule.js.map
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "commitlint-plugin-function-rules",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "commitlint plugin to define rules as functions.",
|
|
5
|
-
"main": "dist/
|
|
6
|
-
"types": "dist/
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
|
-
"dist
|
|
8
|
+
"dist/**/!(*.test).{js,d.ts}"
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
|
-
"
|
|
12
|
-
"prepublishOnly": "pinst --disable",
|
|
13
|
-
"postpublish": "pinst --enable",
|
|
11
|
+
"prepare": "husky install .github/husky",
|
|
14
12
|
"lint": "run-p format:check lint-es",
|
|
15
13
|
"lint:fix": "run-s format lint-es:fix",
|
|
16
14
|
"lint-es": "eslint --ext .ts,.tsx,.js,.jsx,.json .",
|
|
@@ -24,9 +22,7 @@
|
|
|
24
22
|
"build:check": "tsc --noEmit",
|
|
25
23
|
"build:clean-first": "run-s clean build",
|
|
26
24
|
"clean": "rm -rf ./dist",
|
|
27
|
-
"test": "
|
|
28
|
-
"test:ci": "jest --ci --verbose",
|
|
29
|
-
"test:staged": "jest --passWithNoTests --findRelatedTests $(git diff --staged --name-only)"
|
|
25
|
+
"test": "c8 ava"
|
|
30
26
|
},
|
|
31
27
|
"repository": {
|
|
32
28
|
"type": "git",
|
|
@@ -48,44 +44,66 @@
|
|
|
48
44
|
"node": ">=12"
|
|
49
45
|
},
|
|
50
46
|
"peerDependencies": {
|
|
51
|
-
"@commitlint/lint": ">=9.1.2 <
|
|
47
|
+
"@commitlint/lint": ">=9.1.2 <17"
|
|
52
48
|
},
|
|
53
49
|
"devDependencies": {
|
|
54
|
-
"@
|
|
55
|
-
"@commitlint/
|
|
50
|
+
"@ava/typescript": "3.0.1",
|
|
51
|
+
"@commitlint/cli": "16.2.3",
|
|
52
|
+
"@commitlint/config-conventional": "16.2.1",
|
|
56
53
|
"@commitlint/lint-10.x": "npm:@commitlint/lint@10.0.0",
|
|
57
54
|
"@commitlint/lint-11.x": "npm:@commitlint/lint@11.0.0",
|
|
58
55
|
"@commitlint/lint-12.x": "npm:@commitlint/lint@12.1.4",
|
|
59
56
|
"@commitlint/lint-13.x": "npm:@commitlint/lint@13.2.0",
|
|
60
57
|
"@commitlint/lint-14.x": "npm:@commitlint/lint@14.1.0",
|
|
58
|
+
"@commitlint/lint-15.x": "npm:@commitlint/lint@15.0.0",
|
|
59
|
+
"@commitlint/lint-16.x": "npm:@commitlint/lint@16.2.1",
|
|
61
60
|
"@commitlint/lint-9.x": "npm:@commitlint/lint@9.1.2",
|
|
62
61
|
"@commitlint/load-10.x": "npm:@commitlint/load@10.0.0",
|
|
63
62
|
"@commitlint/load-11.x": "npm:@commitlint/load@11.0.0",
|
|
64
63
|
"@commitlint/load-12.x": "npm:@commitlint/load@12.1.4",
|
|
65
64
|
"@commitlint/load-13.x": "npm:@commitlint/load@13.2.1",
|
|
66
65
|
"@commitlint/load-14.x": "npm:@commitlint/load@14.1.0",
|
|
66
|
+
"@commitlint/load-15.x": "npm:@commitlint/load@15.0.0",
|
|
67
|
+
"@commitlint/load-16.x": "npm:@commitlint/load@16.2.3",
|
|
67
68
|
"@commitlint/load-9.x": "npm:@commitlint/load@9.1.2",
|
|
68
|
-
"@commitlint/rules": "
|
|
69
|
-
"@commitlint/types": "
|
|
70
|
-
"@jest/globals": "27.3.1",
|
|
69
|
+
"@commitlint/rules": "16.2.1",
|
|
70
|
+
"@commitlint/types": "16.2.1",
|
|
71
71
|
"@semantic-release/changelog": "6.0.1",
|
|
72
|
-
"@semantic-release/exec": "6.0.
|
|
72
|
+
"@semantic-release/exec": "6.0.3",
|
|
73
73
|
"@semantic-release/git": "10.0.1",
|
|
74
|
-
"@
|
|
75
|
-
"@typescript-eslint/
|
|
76
|
-
"eslint": "
|
|
77
|
-
"
|
|
78
|
-
"
|
|
74
|
+
"@types/sinon": "10.0.11",
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "5.19.0",
|
|
76
|
+
"@typescript-eslint/parser": "5.19.0",
|
|
77
|
+
"ava": "4.2.0",
|
|
78
|
+
"c8": "7.11.0",
|
|
79
|
+
"eslint": "8.13.0",
|
|
80
|
+
"eslint-config-prettier": "8.5.0",
|
|
79
81
|
"eslint-plugin-json": "3.1.0",
|
|
80
82
|
"eslint-plugin-prettier": "4.0.0",
|
|
81
83
|
"husky": "7.0.4",
|
|
82
|
-
"
|
|
83
|
-
"lint-staged": "11.2.6",
|
|
84
|
+
"lint-staged": "12.3.7",
|
|
84
85
|
"npm-run-all": "4.1.5",
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
|
|
86
|
+
"prettier": "2.6.2",
|
|
87
|
+
"semantic-release": "19.0.2",
|
|
88
|
+
"sinon": "13.0.2",
|
|
89
|
+
"typescript": "4.6.3"
|
|
90
|
+
},
|
|
91
|
+
"ava": {
|
|
92
|
+
"typescript": {
|
|
93
|
+
"rewritePaths": {
|
|
94
|
+
"src/": "dist/"
|
|
95
|
+
},
|
|
96
|
+
"compile": "tsc"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"c8": {
|
|
100
|
+
"reporter": [
|
|
101
|
+
"cobertura",
|
|
102
|
+
"lcovonly",
|
|
103
|
+
"text"
|
|
104
|
+
],
|
|
105
|
+
"include": [
|
|
106
|
+
"dist/**/*.js"
|
|
107
|
+
]
|
|
90
108
|
}
|
|
91
109
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const functionRule = (parsed, when = 'always', value) => {
|
|
4
|
-
if (typeof value === 'function') {
|
|
5
|
-
return value(parsed, when);
|
|
6
|
-
}
|
|
7
|
-
throw new Error('Not a valid function!');
|
|
8
|
-
};
|
|
9
|
-
exports.default = functionRule;
|