commitlint-plugin-function-rules 2.0.0 → 2.0.1-beta.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/README.md +13 -22
- package/dist/function-rule.d.ts +3 -4
- package/dist/function-rule.js +3 -5
- package/dist/index.cjs +57 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -9
- package/dist/plugin.d.ts +3 -0
- package/dist/plugin.js +4 -0
- package/dist/rules.d.ts +2 -2
- package/dist/rules.js +37 -42
- package/package.json +98 -90
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# commitlint plugin function rules
|
|
1
|
+
# commitlint plugin function rules <!-- omit in toc -->
|
|
2
2
|
|
|
3
|
-
[commitlint][commitlint] plugin to use functions as rule value.
|
|
3
|
+
[**commitlint**][commitlint] plugin to use functions as rule value.
|
|
4
4
|
|
|
5
5
|
- Create custom function, `sync` or `async`, as rule value.
|
|
6
6
|
- Create rules that are based on the commit message.
|
|
7
7
|
- Write rules with regular expressions.
|
|
8
|
-
- Use the same rules that are [available
|
|
8
|
+
- Use the same rules that are [available in **commitlint**][commitlint].
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -17,13 +17,8 @@
|
|
|
17
17
|
[](https://codecov.io/gh/vidavidorra/commitlint-plugin-function-rules)
|
|
18
18
|
[](LICENSE.md)
|
|
19
19
|
|
|
20
|
-
<a name="toc"></a>
|
|
21
|
-
|
|
22
|
-
## Table of contents
|
|
23
|
-
|
|
24
20
|
- [Install](#install)
|
|
25
21
|
- [Usage](#usage)
|
|
26
|
-
- [Documentation](#documentation)
|
|
27
22
|
- [Contributing](#contributing)
|
|
28
23
|
- [Security policy](#security-policy)
|
|
29
24
|
- [License](#license)
|
|
@@ -31,14 +26,14 @@
|
|
|
31
26
|
## Install
|
|
32
27
|
|
|
33
28
|
```shell
|
|
34
|
-
npm install --save-dev commitlint-plugin-function-rules @commitlint/cli
|
|
29
|
+
npm install --save-dev commitlint-plugin-function-rules @commitlint/cli @commitlint/config-conventional
|
|
35
30
|
```
|
|
36
31
|
|
|
37
32
|
## Usage
|
|
38
33
|
|
|
39
|
-
Use this plugin in your project's commitlint configuration by specifying it as item in the `plugins` array. All rules have same name as
|
|
34
|
+
Use this plugin in your project's [**commitlint**][commitlint] configuration by specifying it as item in the `plugins` array. All rules have same name as rules that are [available in **commitlint**][rules], but with the `function-rules` prefix. The example `commitlint.config.js`, or `commitlint.config.cjs` if the package is an ES module, shows the usage of a function rule.
|
|
40
35
|
|
|
41
|
-
> **
|
|
36
|
+
> **Note** The available rules are the same as in [**commitlint**][commitlint], so it is recommended to disable the [**commitlint**][commitlint] rule when specifying a function rule to avoid undefined behaviour.
|
|
42
37
|
|
|
43
38
|
```js
|
|
44
39
|
module.exports = {
|
|
@@ -50,31 +45,26 @@ module.exports = {
|
|
|
50
45
|
2, // level: error
|
|
51
46
|
'always',
|
|
52
47
|
(parsed) => {
|
|
53
|
-
|
|
48
|
+
// Allow longer headers for commits with "deps" scope.
|
|
49
|
+
if (parsed.scope === 'deps' && parsed.header.length <= 200) {
|
|
54
50
|
return [true];
|
|
55
51
|
}
|
|
56
|
-
return [false, '
|
|
52
|
+
return [false, 'deps header must not be longer than 200 characters'];
|
|
57
53
|
},
|
|
58
54
|
],
|
|
59
55
|
},
|
|
60
56
|
};
|
|
61
57
|
```
|
|
62
58
|
|
|
63
|
-
## Documentation
|
|
64
|
-
|
|
65
59
|
## Contributing
|
|
66
60
|
|
|
67
|
-
Please [create an issue](https://github.com/vidavidorra/commitlint-plugin-function-rules/issues/new/choose) if you have a bug report
|
|
68
|
-
|
|
69
|
-
Please give this project a star ⭐ if you like it and consider becoming a [sponsor](https://github.com/sponsors/jdbruijn) to support this project.
|
|
61
|
+
Please [create an issue](https://github.com/vidavidorra/commitlint-plugin-function-rules/issues/new/choose) if you have a bug report or feature proposal, or [create a discussion](https://github.com/vidavidorra/commitlint-plugin-function-rules/discussions) if you have a question. If you like this project, please consider giving it a star ⭐ and/or become a [sponsor](https://github.com/sponsors/jdbruijn) to support my work.
|
|
70
62
|
|
|
71
63
|
Refer to the [contributing guide](https://github.com/vidavidorra/.github/blob/main/CONTRIBUTING.md) detailed information about other contributions, like pull requests.
|
|
72
64
|
|
|
73
65
|
[](https://conventionalcommits.org)
|
|
66
|
+
[](https://github.com/xojs/xo)
|
|
74
67
|
[](https://github.com/prettier/prettier)
|
|
75
|
-
[](https://eslint.org)
|
|
76
|
-
[](https://github.com/vidavidorra/commitlint-plugin-function-rules/actions)
|
|
77
|
-
[](https://github.com/vidavidorra/commitlint-plugin-function-rules/actions)
|
|
78
68
|
|
|
79
69
|
## Security policy
|
|
80
70
|
|
|
@@ -86,7 +76,7 @@ This project is licensed under the [GPLv3 license](https://www.gnu.org/licenses/
|
|
|
86
76
|
|
|
87
77
|
Copyright © 2020-2023 Jeroen de Bruijn
|
|
88
78
|
|
|
89
|
-
<details><summary>License
|
|
79
|
+
<details><summary>License notice</summary>
|
|
90
80
|
<p>
|
|
91
81
|
|
|
92
82
|
This program is free software: you can redistribute it and/or modify
|
|
@@ -109,3 +99,4 @@ The full text of the license is available in the [LICENSE](LICENSE.md) file in t
|
|
|
109
99
|
<!-- References -->
|
|
110
100
|
|
|
111
101
|
[commitlint]: https://commitlint.js.org/
|
|
102
|
+
[rules]: https://commitlint.js.org/#/reference-rules
|
package/dist/function-rule.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Commit, Rule, RuleConfigCondition, RuleOutcome } from '@commitlint/types';
|
|
2
|
-
|
|
1
|
+
import { type Commit, type Rule, type RuleConfigCondition, type RuleOutcome } from '@commitlint/types';
|
|
2
|
+
type FunctionRule = (parsed: Commit, when: RuleConfigCondition) => RuleOutcome | Promise<RuleOutcome>;
|
|
3
3
|
declare const functionRule: Rule<FunctionRule>;
|
|
4
|
-
export
|
|
5
|
-
export { FunctionRule };
|
|
4
|
+
export { type FunctionRule, functionRule };
|
package/dist/function-rule.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const functionRule = (parsed, when = 'always', functionRule) => {
|
|
1
|
+
const functionRule = async (parsed, when = 'always', functionRule) => {
|
|
4
2
|
if (functionRule === undefined) {
|
|
5
3
|
return [true];
|
|
6
4
|
}
|
|
7
5
|
if (typeof functionRule !== 'function') {
|
|
8
|
-
throw new
|
|
6
|
+
throw new TypeError('Not a valid function!');
|
|
9
7
|
}
|
|
10
8
|
return functionRule(parsed, when);
|
|
11
9
|
};
|
|
12
|
-
|
|
10
|
+
export { functionRule };
|
|
13
11
|
//# sourceMappingURL=function-rule.js.map
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// src/function-rule.ts
|
|
4
|
+
var functionRule = async (parsed, when = "always", functionRule2) => {
|
|
5
|
+
if (functionRule2 === void 0) {
|
|
6
|
+
return [true];
|
|
7
|
+
}
|
|
8
|
+
if (typeof functionRule2 !== "function") {
|
|
9
|
+
throw new TypeError("Not a valid function!");
|
|
10
|
+
}
|
|
11
|
+
return functionRule2(parsed, when);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// src/rules.ts
|
|
15
|
+
var rules = {
|
|
16
|
+
"function-rules/body-case": functionRule,
|
|
17
|
+
"function-rules/body-empty": functionRule,
|
|
18
|
+
"function-rules/body-full-stop": functionRule,
|
|
19
|
+
"function-rules/body-leading-blank": functionRule,
|
|
20
|
+
"function-rules/body-max-length": functionRule,
|
|
21
|
+
"function-rules/body-max-line-length": functionRule,
|
|
22
|
+
"function-rules/body-min-length": functionRule,
|
|
23
|
+
"function-rules/footer-empty": functionRule,
|
|
24
|
+
"function-rules/footer-leading-blank": functionRule,
|
|
25
|
+
"function-rules/footer-max-length": functionRule,
|
|
26
|
+
"function-rules/footer-max-line-length": functionRule,
|
|
27
|
+
"function-rules/footer-min-length": functionRule,
|
|
28
|
+
"function-rules/header-case": functionRule,
|
|
29
|
+
"function-rules/header-full-stop": functionRule,
|
|
30
|
+
"function-rules/header-max-length": functionRule,
|
|
31
|
+
"function-rules/header-min-length": functionRule,
|
|
32
|
+
"function-rules/references-empty": functionRule,
|
|
33
|
+
"function-rules/scope-case": functionRule,
|
|
34
|
+
"function-rules/scope-empty": functionRule,
|
|
35
|
+
"function-rules/scope-enum": functionRule,
|
|
36
|
+
"function-rules/scope-max-length": functionRule,
|
|
37
|
+
"function-rules/scope-min-length": functionRule,
|
|
38
|
+
"function-rules/signed-off-by": functionRule,
|
|
39
|
+
"function-rules/subject-case": functionRule,
|
|
40
|
+
"function-rules/subject-empty": functionRule,
|
|
41
|
+
"function-rules/subject-exclamation-mark": functionRule,
|
|
42
|
+
"function-rules/subject-full-stop": functionRule,
|
|
43
|
+
"function-rules/subject-max-length": functionRule,
|
|
44
|
+
"function-rules/subject-min-length": functionRule,
|
|
45
|
+
"function-rules/trailer-exists": functionRule,
|
|
46
|
+
"function-rules/type-case": functionRule,
|
|
47
|
+
"function-rules/type-empty": functionRule,
|
|
48
|
+
"function-rules/type-enum": functionRule,
|
|
49
|
+
"function-rules/type-max-length": functionRule,
|
|
50
|
+
"function-rules/type-min-length": functionRule
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// src/plugin.ts
|
|
54
|
+
var plugin = { rules };
|
|
55
|
+
|
|
56
|
+
// src/index.ts
|
|
57
|
+
module.exports = plugin;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const plugin: Plugin;
|
|
1
|
+
import { plugin } from './plugin.js';
|
|
3
2
|
/**
|
|
4
3
|
* Export single object, according to the CommonJS model. The CommonJS module is
|
|
5
4
|
* explicitly used here as that's the kind of module commitlint requires for
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
const rules_1 = __importDefault(require("./rules"));
|
|
6
|
-
const plugin = {
|
|
7
|
-
rules: rules_1.default,
|
|
8
|
-
};
|
|
9
|
-
module.exports = plugin;
|
|
1
|
+
import { plugin } from './plugin.js';
|
|
10
2
|
//# sourceMappingURL=index.js.map
|
package/dist/plugin.d.ts
ADDED
package/dist/plugin.js
ADDED
package/dist/rules.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Plugin } from '@commitlint/types';
|
|
1
|
+
import { type Plugin } from '@commitlint/types';
|
|
2
2
|
declare const rules: Plugin['rules'];
|
|
3
|
-
export
|
|
3
|
+
export { rules };
|
package/dist/rules.js
CHANGED
|
@@ -1,45 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const function_rule_1 = __importDefault(require("./function-rule"));
|
|
1
|
+
import { functionRule } from './function-rule.js';
|
|
7
2
|
const rules = {
|
|
8
|
-
'function-rules/body-case':
|
|
9
|
-
'function-rules/body-empty':
|
|
10
|
-
'function-rules/body-full-stop':
|
|
11
|
-
'function-rules/body-leading-blank':
|
|
12
|
-
'function-rules/body-max-length':
|
|
13
|
-
'function-rules/body-max-line-length':
|
|
14
|
-
'function-rules/body-min-length':
|
|
15
|
-
'function-rules/footer-empty':
|
|
16
|
-
'function-rules/footer-leading-blank':
|
|
17
|
-
'function-rules/footer-max-length':
|
|
18
|
-
'function-rules/footer-max-line-length':
|
|
19
|
-
'function-rules/footer-min-length':
|
|
20
|
-
'function-rules/header-case':
|
|
21
|
-
'function-rules/header-full-stop':
|
|
22
|
-
'function-rules/header-max-length':
|
|
23
|
-
'function-rules/header-min-length':
|
|
24
|
-
'function-rules/references-empty':
|
|
25
|
-
'function-rules/scope-case':
|
|
26
|
-
'function-rules/scope-empty':
|
|
27
|
-
'function-rules/scope-enum':
|
|
28
|
-
'function-rules/scope-max-length':
|
|
29
|
-
'function-rules/scope-min-length':
|
|
30
|
-
'function-rules/signed-off-by':
|
|
31
|
-
'function-rules/subject-case':
|
|
32
|
-
'function-rules/subject-empty':
|
|
33
|
-
'function-rules/subject-exclamation-mark':
|
|
34
|
-
'function-rules/subject-full-stop':
|
|
35
|
-
'function-rules/subject-max-length':
|
|
36
|
-
'function-rules/subject-min-length':
|
|
37
|
-
'function-rules/trailer-exists':
|
|
38
|
-
'function-rules/type-case':
|
|
39
|
-
'function-rules/type-empty':
|
|
40
|
-
'function-rules/type-enum':
|
|
41
|
-
'function-rules/type-max-length':
|
|
42
|
-
'function-rules/type-min-length':
|
|
3
|
+
'function-rules/body-case': functionRule,
|
|
4
|
+
'function-rules/body-empty': functionRule,
|
|
5
|
+
'function-rules/body-full-stop': functionRule,
|
|
6
|
+
'function-rules/body-leading-blank': functionRule,
|
|
7
|
+
'function-rules/body-max-length': functionRule,
|
|
8
|
+
'function-rules/body-max-line-length': functionRule,
|
|
9
|
+
'function-rules/body-min-length': functionRule,
|
|
10
|
+
'function-rules/footer-empty': functionRule,
|
|
11
|
+
'function-rules/footer-leading-blank': functionRule,
|
|
12
|
+
'function-rules/footer-max-length': functionRule,
|
|
13
|
+
'function-rules/footer-max-line-length': functionRule,
|
|
14
|
+
'function-rules/footer-min-length': functionRule,
|
|
15
|
+
'function-rules/header-case': functionRule,
|
|
16
|
+
'function-rules/header-full-stop': functionRule,
|
|
17
|
+
'function-rules/header-max-length': functionRule,
|
|
18
|
+
'function-rules/header-min-length': functionRule,
|
|
19
|
+
'function-rules/references-empty': functionRule,
|
|
20
|
+
'function-rules/scope-case': functionRule,
|
|
21
|
+
'function-rules/scope-empty': functionRule,
|
|
22
|
+
'function-rules/scope-enum': functionRule,
|
|
23
|
+
'function-rules/scope-max-length': functionRule,
|
|
24
|
+
'function-rules/scope-min-length': functionRule,
|
|
25
|
+
'function-rules/signed-off-by': functionRule,
|
|
26
|
+
'function-rules/subject-case': functionRule,
|
|
27
|
+
'function-rules/subject-empty': functionRule,
|
|
28
|
+
'function-rules/subject-exclamation-mark': functionRule,
|
|
29
|
+
'function-rules/subject-full-stop': functionRule,
|
|
30
|
+
'function-rules/subject-max-length': functionRule,
|
|
31
|
+
'function-rules/subject-min-length': functionRule,
|
|
32
|
+
'function-rules/trailer-exists': functionRule,
|
|
33
|
+
'function-rules/type-case': functionRule,
|
|
34
|
+
'function-rules/type-empty': functionRule,
|
|
35
|
+
'function-rules/type-enum': functionRule,
|
|
36
|
+
'function-rules/type-max-length': functionRule,
|
|
37
|
+
'function-rules/type-min-length': functionRule,
|
|
43
38
|
};
|
|
44
|
-
|
|
39
|
+
export { rules };
|
|
45
40
|
//# sourceMappingURL=rules.js.map
|
package/package.json
CHANGED
|
@@ -1,108 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "commitlint-plugin-function-rules",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1-beta.1",
|
|
4
4
|
"description": "commitlint plugin to define rules as functions.",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist/**/!(*.test).{js,d.ts}"
|
|
9
|
-
],
|
|
10
|
-
"scripts": {
|
|
11
|
-
"prepare": "husky install .github/husky",
|
|
12
|
-
"lint": "run-p format:check lint-es",
|
|
13
|
-
"lint:fix": "run-s format lint-es:fix",
|
|
14
|
-
"lint-es": "eslint --ext .ts,.tsx,.js,.jsx,.json .",
|
|
15
|
-
"lint-es:file": "eslint --ext .ts,.tsx,.js,.jsx,.json",
|
|
16
|
-
"lint-es:fix": "eslint --ext .ts,.tsx,.js,.jsx,.json --fix .",
|
|
17
|
-
"lint-es:file:fix": "eslint --ext .ts,.tsx,.js,.jsx,.json --fix",
|
|
18
|
-
"format:check": "prettier --ignore-path .gitignore --check \"**/*.{vue,css,less,scss,html,htm,json,md,markdown,yml,yaml}\" --loglevel warn",
|
|
19
|
-
"format": "prettier --ignore-path .gitignore --write \"**/*.{vue,css,less,scss,html,htm,json,md,markdown,yml,yaml}\" --loglevel warn",
|
|
20
|
-
"build": "tsc",
|
|
21
|
-
"test": "c8 ava"
|
|
22
|
-
},
|
|
23
|
-
"repository": {
|
|
24
|
-
"type": "git",
|
|
25
|
-
"url": "git+https://github.com/vidavidorra/commitlint-plugin-function-rules.git"
|
|
26
|
-
},
|
|
27
5
|
"keywords": [
|
|
28
6
|
"commitlint",
|
|
29
7
|
"commitlintplugin",
|
|
30
8
|
"plugin",
|
|
31
9
|
"rules"
|
|
32
10
|
],
|
|
33
|
-
"
|
|
34
|
-
"license": "GPL-3.0-or-later",
|
|
11
|
+
"homepage": "https://github.com/vidavidorra/commitlint-plugin-function-rules#readme",
|
|
35
12
|
"bugs": {
|
|
36
13
|
"url": "https://github.com/vidavidorra/commitlint-plugin-function-rules/issues"
|
|
37
14
|
},
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
},
|
|
42
|
-
"peerDependencies": {
|
|
43
|
-
"@commitlint/lint": ">=9.1.2 <18"
|
|
44
|
-
},
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"@ava/typescript": "3.0.1",
|
|
47
|
-
"@commitlint/cli": "17.4.4",
|
|
48
|
-
"@commitlint/config-conventional": "17.4.4",
|
|
49
|
-
"@commitlint/lint-10.x": "npm:@commitlint/lint@10.0.0",
|
|
50
|
-
"@commitlint/lint-11.x": "npm:@commitlint/lint@11.0.0",
|
|
51
|
-
"@commitlint/lint-12.x": "npm:@commitlint/lint@12.1.4",
|
|
52
|
-
"@commitlint/lint-13.x": "npm:@commitlint/lint@13.2.0",
|
|
53
|
-
"@commitlint/lint-14.x": "npm:@commitlint/lint@14.1.0",
|
|
54
|
-
"@commitlint/lint-15.x": "npm:@commitlint/lint@15.0.0",
|
|
55
|
-
"@commitlint/lint-16.x": "npm:@commitlint/lint@16.2.4",
|
|
56
|
-
"@commitlint/lint-17.x": "npm:@commitlint/lint@17.4.4",
|
|
57
|
-
"@commitlint/lint-9.x": "npm:@commitlint/lint@9.1.2",
|
|
58
|
-
"@commitlint/load-10.x": "npm:@commitlint/load@10.0.0",
|
|
59
|
-
"@commitlint/load-11.x": "npm:@commitlint/load@11.0.0",
|
|
60
|
-
"@commitlint/load-12.x": "npm:@commitlint/load@12.1.4",
|
|
61
|
-
"@commitlint/load-13.x": "npm:@commitlint/load@13.2.1",
|
|
62
|
-
"@commitlint/load-14.x": "npm:@commitlint/load@14.1.0",
|
|
63
|
-
"@commitlint/load-15.x": "npm:@commitlint/load@15.0.0",
|
|
64
|
-
"@commitlint/load-16.x": "npm:@commitlint/load@16.3.0",
|
|
65
|
-
"@commitlint/load-17.x": "npm:@commitlint/load@17.4.4",
|
|
66
|
-
"@commitlint/load-9.x": "npm:@commitlint/load@9.1.2",
|
|
67
|
-
"@commitlint/rules": "17.4.4",
|
|
68
|
-
"@commitlint/types": "17.4.4",
|
|
69
|
-
"@semantic-release/changelog": "6.0.3",
|
|
70
|
-
"@semantic-release/exec": "6.0.3",
|
|
71
|
-
"@semantic-release/git": "10.0.1",
|
|
72
|
-
"@types/sinon": "10.0.13",
|
|
73
|
-
"@typescript-eslint/eslint-plugin": "5.58.0",
|
|
74
|
-
"@typescript-eslint/parser": "5.58.0",
|
|
75
|
-
"ava": "5.0.1",
|
|
76
|
-
"c8": "7.13.0",
|
|
77
|
-
"eslint": "8.38.0",
|
|
78
|
-
"eslint-config-prettier": "8.8.0",
|
|
79
|
-
"eslint-plugin-json": "3.1.0",
|
|
80
|
-
"eslint-plugin-prettier": "4.2.1",
|
|
81
|
-
"husky": "8.0.3",
|
|
82
|
-
"lint-staged": "13.2.1",
|
|
83
|
-
"npm-run-all": "4.1.5",
|
|
84
|
-
"prettier": "2.8.7",
|
|
85
|
-
"semantic-release": "21.0.1",
|
|
86
|
-
"sinon": "15.0.3",
|
|
87
|
-
"typescript": "4.8.4"
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/vidavidorra/commitlint-plugin-function-rules.git"
|
|
88
18
|
},
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"
|
|
19
|
+
"license": "GPL-3.0-or-later",
|
|
20
|
+
"author": "Jeroen de Bruijn",
|
|
21
|
+
"type": "module",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": "./dist/index.js",
|
|
25
|
+
"require": "./dist/index.cjs"
|
|
95
26
|
}
|
|
96
27
|
},
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"files": [
|
|
30
|
+
"./dist/**/!(*.test).{js,d.ts,cjs}"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"prepare": "husky install .github/husky",
|
|
34
|
+
"lint": "npm run format:check && xo",
|
|
35
|
+
"lint:fix": "npm run format && xo --fix",
|
|
36
|
+
"format:check": "prettier --ignore-path .gitignore --check \"**/*.{vue,css,less,scss,html,htm,json,md,markdown,yml,yaml}\" --loglevel warn",
|
|
37
|
+
"format": "prettier --ignore-path .gitignore --write \"**/*.{vue,css,less,scss,html,htm,json,md,markdown,yml,yaml}\" --loglevel warn",
|
|
38
|
+
"build": "npm run build:esm && npm run build:cjs",
|
|
39
|
+
"build:esm": "tsc",
|
|
40
|
+
"build:cjs": "esbuild src/index.ts --bundle --platform=node --outfile=dist/index.cjs",
|
|
41
|
+
"test": "c8 ava"
|
|
106
42
|
},
|
|
107
43
|
"prettier": {
|
|
108
44
|
"singleQuote": true,
|
|
@@ -228,5 +164,77 @@
|
|
|
228
164
|
}
|
|
229
165
|
]
|
|
230
166
|
}
|
|
167
|
+
},
|
|
168
|
+
"ava": {
|
|
169
|
+
"files": [
|
|
170
|
+
"!worktrees",
|
|
171
|
+
"src/**/*.test.ts"
|
|
172
|
+
],
|
|
173
|
+
"typescript": {
|
|
174
|
+
"rewritePaths": {
|
|
175
|
+
"src/": "dist/"
|
|
176
|
+
},
|
|
177
|
+
"compile": "tsc"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"c8": {
|
|
181
|
+
"include": [
|
|
182
|
+
"dist/**/*.js"
|
|
183
|
+
],
|
|
184
|
+
"reporter": [
|
|
185
|
+
"cobertura",
|
|
186
|
+
"html",
|
|
187
|
+
"lcovonly",
|
|
188
|
+
"text-summary"
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
"xo": {
|
|
192
|
+
"prettier": true,
|
|
193
|
+
"space": true
|
|
194
|
+
},
|
|
195
|
+
"devDependencies": {
|
|
196
|
+
"@ava/typescript": "4.0.0",
|
|
197
|
+
"@commitlint/cli": "17.6.5",
|
|
198
|
+
"@commitlint/config-conventional": "17.6.5",
|
|
199
|
+
"@commitlint/lint-10.x": "npm:@commitlint/lint@10.0.0",
|
|
200
|
+
"@commitlint/lint-11.x": "npm:@commitlint/lint@11.0.0",
|
|
201
|
+
"@commitlint/lint-12.x": "npm:@commitlint/lint@12.1.4",
|
|
202
|
+
"@commitlint/lint-13.x": "npm:@commitlint/lint@13.2.0",
|
|
203
|
+
"@commitlint/lint-14.x": "npm:@commitlint/lint@14.1.0",
|
|
204
|
+
"@commitlint/lint-15.x": "npm:@commitlint/lint@15.0.0",
|
|
205
|
+
"@commitlint/lint-16.x": "npm:@commitlint/lint@16.2.4",
|
|
206
|
+
"@commitlint/lint-17.x": "npm:@commitlint/lint@17.6.5",
|
|
207
|
+
"@commitlint/lint-9.x": "npm:@commitlint/lint@9.1.2",
|
|
208
|
+
"@commitlint/load-10.x": "npm:@commitlint/load@10.0.0",
|
|
209
|
+
"@commitlint/load-11.x": "npm:@commitlint/load@11.0.0",
|
|
210
|
+
"@commitlint/load-12.x": "npm:@commitlint/load@12.1.4",
|
|
211
|
+
"@commitlint/load-13.x": "npm:@commitlint/load@13.2.1",
|
|
212
|
+
"@commitlint/load-14.x": "npm:@commitlint/load@14.1.0",
|
|
213
|
+
"@commitlint/load-15.x": "npm:@commitlint/load@15.0.0",
|
|
214
|
+
"@commitlint/load-16.x": "npm:@commitlint/load@16.3.0",
|
|
215
|
+
"@commitlint/load-17.x": "npm:@commitlint/load@17.5.0",
|
|
216
|
+
"@commitlint/load-9.x": "npm:@commitlint/load@9.1.2",
|
|
217
|
+
"@commitlint/rules": "17.6.5",
|
|
218
|
+
"@commitlint/types": "17.4.4",
|
|
219
|
+
"@semantic-release/changelog": "6.0.3",
|
|
220
|
+
"@semantic-release/exec": "6.0.3",
|
|
221
|
+
"@semantic-release/git": "10.0.1",
|
|
222
|
+
"@types/sinon": "10.0.15",
|
|
223
|
+
"ava": "5.2.0",
|
|
224
|
+
"c8": "8.0.0",
|
|
225
|
+
"esbuild": "0.18.6",
|
|
226
|
+
"husky": "8.0.3",
|
|
227
|
+
"lint-staged": "13.2.2",
|
|
228
|
+
"prettier": "2.8.8",
|
|
229
|
+
"semantic-release": "21.0.5",
|
|
230
|
+
"sinon": "15.1.2",
|
|
231
|
+
"typescript": "5.0.3",
|
|
232
|
+
"xo": "0.54.2"
|
|
233
|
+
},
|
|
234
|
+
"peerDependencies": {
|
|
235
|
+
"@commitlint/lint": ">=9.1.2 <18"
|
|
236
|
+
},
|
|
237
|
+
"engines": {
|
|
238
|
+
"node": ">=16"
|
|
231
239
|
}
|
|
232
240
|
}
|