@lanzorg/commitlint-config-template 0.0.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 ADDED
@@ -0,0 +1,14 @@
1
+ <div align="center">
2
+ <p><img src=".assets/icon.png" align="center" width="112"></p>
3
+ <h1><samp>TEMPLATE</samp></h1>
4
+ </div>
5
+
6
+ <table><tr><td align="center" width="99999"><p>
7
+ <a href="#">WEBSITE</a> ·
8
+ <a href="#">DOCUMENTATION</a> ·
9
+ <a href="#">FUNDING</a>
10
+ </p></td></tr></table>
11
+
12
+ <table><tr><td align="center" width="99999">&nbsp;<p>
13
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse blandit justo vel tellus pharetra, ut sollicitudin erat lobortis. Etiam non lacinia neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames duis.
14
+ </p>&nbsp;</td></tr></table>
@@ -0,0 +1,5 @@
1
+ import { UserConfig } from '@commitlint/types';
2
+
3
+ declare const config: UserConfig;
4
+
5
+ export { config as default };
package/dist/index.js ADDED
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ default: () => index_default
24
+ });
25
+ module.exports = __toCommonJS(index_exports);
26
+ var config = {
27
+ extends: ["@commitlint/config-conventional"],
28
+ rules: {
29
+ "template/verb-subject": [2, "always"]
30
+ },
31
+ plugins: [
32
+ {
33
+ rules: {
34
+ "template/verb-subject": async (parsed) => {
35
+ const payload = parsed.subject?.split(" ")?.[0];
36
+ if (!payload) return [true, ""];
37
+ const address = `https://api.datamuse.com/words?sp=${payload}&md=p&max=1`;
38
+ const content = await fetch(address).then((r) => r.json());
39
+ const correct = content?.[0]?.tags?.includes("v") ?? false;
40
+ return [correct, "Subject must start with a verb"];
41
+ }
42
+ }
43
+ }
44
+ ]
45
+ };
46
+ var index_default = config;
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@lanzorg/commitlint-config-template",
3
+ "version": "0.0.1",
4
+ "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "scripts": {
10
+ "build": "tsup src/index.ts --dts",
11
+ "prepublishOnly": "npm run build"
12
+ },
13
+ "devDependencies": {
14
+ "@commitlint/config-conventional": "^21.0.2",
15
+ "@commitlint/types": "^21.0.1",
16
+ "tsup": "^8.5.1",
17
+ "typescript": "^6.0.3"
18
+ }
19
+ }