@w5s/commitlint-config 3.31.0 → 3.32.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/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/config.d.ts
2
1
  declare const config: {
3
2
  parserPreset: {
4
3
  parserOpts: any;
@@ -6,13 +5,9 @@ declare const config: {
6
5
  plugins: import("@commitlint/types").Plugin[];
7
6
  rules: Partial<import("@commitlint/types").RulesConfig<import("@commitlint/types").RuleConfigQuality.Qualified>>;
8
7
  };
9
- //#endregion
10
- //#region src/meta.d.ts
11
8
  export declare const meta: Readonly<{
12
9
  buildNumber: number;
13
10
  name: string;
14
11
  version: string;
15
12
  }>;
16
- //#endregion
17
- export { config as default };
18
- //# sourceMappingURL=index.d.ts.map
13
+ export { config as default };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { RuleConfigSeverity } from "@commitlint/types";
2
2
  import conventionalChangelogPreset, { Emoji, GitmojiCode } from "@w5s/conventional-changelog";
3
- //#region src/plugin.ts
3
+ // src/plugin.ts
4
4
  const $if = (when = "always") => (cond) => when === "always" ? cond : !cond;
5
5
  const typeGitmojiStyle = (parsed, when = "always", value = "unicode") => {
6
6
  const type = parsed["type"];
@@ -20,8 +20,7 @@ const gitmojiPlugin = { rules: {
20
20
  "type-gitmoji-style": typeGitmojiStyle,
21
21
  "type-valid-gitmoji": typeValidGitmoji
22
22
  } };
23
- //#endregion
24
- //#region src/config.ts
23
+ // src/config.ts
25
24
  const { Disabled, Error, Warning } = RuleConfigSeverity;
26
25
  const config = {
27
26
  parserPreset: { parserOpts: (await conventionalChangelogPreset()).parser },
@@ -76,14 +75,12 @@ const config = {
76
75
  "type-valid-gitmoji": [Error, "always"]
77
76
  }
78
77
  };
79
- //#endregion
80
- //#region src/meta.ts
78
+ // src/meta.ts
81
79
  const meta = Object.freeze({
82
- buildNumber: 1790874075,
80
+ buildNumber: 0x6b04cca5,
83
81
  name: "@w5s/commitlint-config",
84
- version: "3.31.0"
82
+ version: "3.32.1"
85
83
  });
86
- //#endregion
87
84
  export { config as default, meta };
88
85
 
89
86
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/plugin.ts","../src/config.ts","../src/meta.ts"],"sourcesContent":["import type { Plugin, Rule, RuleConfigCondition } from '@commitlint/types';\n\nimport { Emoji, GitmojiCode } from '@w5s/conventional-changelog';\n\nconst $if =\n (when: RuleConfigCondition | undefined = 'always') =>\n (cond: boolean) =>\n when === 'always' ? cond : !cond;\n\nexport const typeGitmojiStyle: Rule<'emoji' | 'unicode'> = (parsed, when = 'always', value = 'unicode') => {\n const type = parsed['type'];\n const isUnicode = type != null && Emoji.isUnicode(type);\n const isEmoji = type != null && Emoji.isText(type);\n\n return value === 'unicode'\n ? $if(when)(isUnicode)\n ? [true]\n : [false, `Type should ${when} be an unicode character`]\n : $if(when)(isEmoji)\n ? [true]\n : [false, `Type should ${when} be an valid :emoji:`];\n};\n\nexport const typeValidGitmoji: Rule = (parsed, when = 'always') => {\n const type = parsed['type'];\n const isValidGitmoji = type != null && GitmojiCode.isValid(type);\n\n return $if(when)(isValidGitmoji)\n ? [true]\n : [false, `Type should ${when} be an valid gitmoji (see https://gitmoji.dev)`];\n};\n\n/**\n * Gitmoji plugins\n */\nexport const gitmojiPlugin: Plugin = {\n rules: {\n 'type-gitmoji-style': typeGitmojiStyle,\n 'type-valid-gitmoji': typeValidGitmoji,\n },\n};\n","import { type LintOptions, type QualifiedRules, RuleConfigSeverity } from '@commitlint/types';\nimport conventionalChangelogPreset from '@w5s/conventional-changelog';\n\nimport { gitmojiPlugin } from './plugin.js';\n\nconst { Disabled, Error, Warning } = RuleConfigSeverity;\n\nconst parserPreset = {\n\n // eslint-disable-next-line ts/no-unsafe-assignment\n parserOpts: (await conventionalChangelogPreset()).parser as any,\n} satisfies LintOptions;\n\nconst rules: QualifiedRules = {\n 'body-leading-blank': [Warning, 'always'],\n 'body-max-line-length': [Error, 'always', 100],\n 'footer-leading-blank': [Warning, 'always'],\n 'footer-max-line-length': [Error, 'always', 100],\n 'header-max-length': [Error, 'always', 100],\n 'scope-case': [Error, 'always', 'lower-case'],\n 'subject-case': [Error, 'always', ['sentence-case']],\n 'subject-empty': [Error, 'never'],\n 'subject-exclamation-mark': [Error, 'never'],\n 'subject-full-stop': [Error, 'never', '.'],\n 'type-case': [Error, 'always', 'lower-case'],\n 'type-empty': [Error, 'never'],\n 'type-enum': [Disabled],\n 'type-gitmoji-style': [Error, 'always', 'unicode'],\n 'type-valid-gitmoji': [Error, 'always'],\n};\n\nexport const config = {\n parserPreset,\n plugins: [gitmojiPlugin],\n rules,\n};\n","export const meta = Object.freeze({\n // @ts-ignore - these variables are injected at build time\n buildNumber: (typeof __PACKAGE_BUILD_NUMBER__ === 'undefined' ? 0 : __PACKAGE_BUILD_NUMBER__) as number,\n // @ts-ignore - these variables are injected at build time\n name: (typeof __PACKAGE_NAME__ === 'undefined' ? '' : __PACKAGE_NAME__) as string,\n // @ts-ignore - these variables are injected at build time\n version: (typeof __PACKAGE_VERSION__ === 'undefined' ? '' : __PACKAGE_VERSION__) as string,\n});\n"],"mappings":";;;AAIA,MAAM,OACH,OAAwC,cACtC,SACC,SAAS,WAAW,OAAO,CAAC;AAElC,MAAa,oBAA+C,QAAQ,OAAO,UAAU,QAAQ,cAAc;CACzG,MAAM,OAAO,OAAO;CACpB,MAAM,YAAY,QAAQ,QAAQ,MAAM,UAAU,IAAI;CACtD,MAAM,UAAU,QAAQ,QAAQ,MAAM,OAAO,IAAI;CAEjD,OAAO,UAAU,YACb,IAAI,IAAI,CAAC,CAAC,SAAS,IACjB,CAAC,IAAI,IACL,CAAC,OAAO,eAAe,KAAK,yBAAyB,IACvD,IAAI,IAAI,CAAC,CAAC,OAAO,IACf,CAAC,IAAI,IACL,CAAC,OAAO,eAAe,KAAK,qBAAqB;AACzD;AAEA,MAAa,oBAA0B,QAAQ,OAAO,aAAa;CACjE,MAAM,OAAO,OAAO;CACpB,MAAM,iBAAiB,QAAQ,QAAQ,YAAY,QAAQ,IAAI;CAE/D,OAAO,IAAI,IAAI,CAAC,CAAC,cAAc,IAC3B,CAAC,IAAI,IACL,CAAC,OAAO,eAAe,KAAK,+CAA+C;AACjF;;;;AAKA,MAAa,gBAAwB,EACnC,OAAO;CACL,sBAAsB;CACtB,sBAAsB;AACxB,EACF;;;ACnCA,MAAM,EAAE,UAAU,OAAO,YAAY;AA0BrC,MAAa,SAAS;CACpB,gBAtBA,aAAa,MAAM,4BAA4B,EAAA,CAAG,OAsBlD;CACA,SAAS,CAAC,aAAa;CACvB;EApBA,sBAAsB,CAAC,SAAS,QAAQ;EACxC,wBAAwB;GAAC;GAAO;GAAU;EAAG;EAC7C,wBAAwB,CAAC,SAAS,QAAQ;EAC1C,0BAA0B;GAAC;GAAO;GAAU;EAAG;EAC/C,qBAAqB;GAAC;GAAO;GAAU;EAAG;EAC1C,cAAc;GAAC;GAAO;GAAU;EAAY;EAC5C,gBAAgB;GAAC;GAAO;GAAU,CAAC,eAAe;EAAC;EACnD,iBAAiB,CAAC,OAAO,OAAO;EAChC,4BAA4B,CAAC,OAAO,OAAO;EAC3C,qBAAqB;GAAC;GAAO;GAAS;EAAG;EACzC,aAAa;GAAC;GAAO;GAAU;EAAY;EAC3C,cAAc,CAAC,OAAO,OAAO;EAC7B,aAAa,CAAC,QAAQ;EACtB,sBAAsB;GAAC;GAAO;GAAU;EAAS;EACjD,sBAAsB,CAAC,OAAO,QAAQ;CAMtC;AACF;;;ACnCA,MAAa,OAAO,OAAO,OAAO;CAEhC,aAAA;CAEA,MAAA;CAEA,SAAA;AACF,CAAC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/plugin.ts","../src/config.ts","../src/meta.ts"],"sourcesContent":["import type { Plugin, Rule, RuleConfigCondition } from '@commitlint/types';\n\nimport { Emoji, GitmojiCode } from '@w5s/conventional-changelog';\n\nconst $if =\n (when: RuleConfigCondition | undefined = 'always') =>\n (cond: boolean) =>\n when === 'always' ? cond : !cond;\n\nexport const typeGitmojiStyle: Rule<'emoji' | 'unicode'> = (parsed, when = 'always', value = 'unicode') => {\n const type = parsed['type'];\n const isUnicode = type != null && Emoji.isUnicode(type);\n const isEmoji = type != null && Emoji.isText(type);\n\n return value === 'unicode'\n ? $if(when)(isUnicode)\n ? [true]\n : [false, `Type should ${when} be an unicode character`]\n : $if(when)(isEmoji)\n ? [true]\n : [false, `Type should ${when} be an valid :emoji:`];\n};\n\nexport const typeValidGitmoji: Rule = (parsed, when = 'always') => {\n const type = parsed['type'];\n const isValidGitmoji = type != null && GitmojiCode.isValid(type);\n\n return $if(when)(isValidGitmoji)\n ? [true]\n : [false, `Type should ${when} be an valid gitmoji (see https://gitmoji.dev)`];\n};\n\n/**\n * Gitmoji plugins\n */\nexport const gitmojiPlugin: Plugin = {\n rules: {\n 'type-gitmoji-style': typeGitmojiStyle,\n 'type-valid-gitmoji': typeValidGitmoji,\n },\n};\n","import { type LintOptions, type QualifiedRules, RuleConfigSeverity } from '@commitlint/types';\nimport conventionalChangelogPreset from '@w5s/conventional-changelog';\n\nimport { gitmojiPlugin } from './plugin.js';\n\nconst { Disabled, Error, Warning } = RuleConfigSeverity;\n\nconst parserPreset = {\n\n // eslint-disable-next-line ts/no-unsafe-assignment\n parserOpts: (await conventionalChangelogPreset()).parser as any,\n} satisfies LintOptions;\n\nconst rules: QualifiedRules = {\n 'body-leading-blank': [Warning, 'always'],\n 'body-max-line-length': [Error, 'always', 100],\n 'footer-leading-blank': [Warning, 'always'],\n 'footer-max-line-length': [Error, 'always', 100],\n 'header-max-length': [Error, 'always', 100],\n 'scope-case': [Error, 'always', 'lower-case'],\n 'subject-case': [Error, 'always', ['sentence-case']],\n 'subject-empty': [Error, 'never'],\n 'subject-exclamation-mark': [Error, 'never'],\n 'subject-full-stop': [Error, 'never', '.'],\n 'type-case': [Error, 'always', 'lower-case'],\n 'type-empty': [Error, 'never'],\n 'type-enum': [Disabled],\n 'type-gitmoji-style': [Error, 'always', 'unicode'],\n 'type-valid-gitmoji': [Error, 'always'],\n};\n\nexport const config = {\n parserPreset,\n plugins: [gitmojiPlugin],\n rules,\n};\n","export const meta = Object.freeze({\n // @ts-ignore - these variables are injected at build time\n buildNumber: (typeof __PACKAGE_BUILD_NUMBER__ === 'undefined' ? 0 : __PACKAGE_BUILD_NUMBER__) as number,\n // @ts-ignore - these variables are injected at build time\n name: (typeof __PACKAGE_NAME__ === 'undefined' ? '' : __PACKAGE_NAME__) as string,\n // @ts-ignore - these variables are injected at build time\n version: (typeof __PACKAGE_VERSION__ === 'undefined' ? '' : __PACKAGE_VERSION__) as string,\n});\n"],"mappings":";;;AAIA,MAAM,OACH,OAAwC,cACtC,SACC,SAAS,WAAW,OAAO,CAAC;AAElC,MAAa,oBAA+C,QAAQ,OAAO,UAAU,QAAQ,cAAc;CACzG,MAAM,OAAO,OAAO;CACpB,MAAM,YAAY,QAAQ,QAAQ,MAAM,UAAU,IAAI;CACtD,MAAM,UAAU,QAAQ,QAAQ,MAAM,OAAO,IAAI;CAEjD,OAAO,UAAU,YACb,IAAI,IAAI,CAAC,CAAC,SAAS,IACjB,CAAC,IAAI,IACL,CAAC,OAAO,eAAe,KAAK,yBAAyB,IACvD,IAAI,IAAI,CAAC,CAAC,OAAO,IACf,CAAC,IAAI,IACL,CAAC,OAAO,eAAe,KAAK,qBAAqB;AACzD;AAEA,MAAa,oBAA0B,QAAQ,OAAO,aAAa;CACjE,MAAM,OAAO,OAAO;CACpB,MAAM,iBAAiB,QAAQ,QAAQ,YAAY,QAAQ,IAAI;CAE/D,OAAO,IAAI,IAAI,CAAC,CAAC,cAAc,IAC3B,CAAC,IAAI,IACL,CAAC,OAAO,eAAe,KAAK,+CAA+C;AACjF;;;;AAKA,MAAa,gBAAwB,EACnC,OAAO;CACL,sBAAsB;CACtB,sBAAsB;AACxB,EACF;;ACnCA,MAAM,EAAE,UAAU,OAAO,YAAY;AA0BrC,MAAa,SAAS;CACpB,gBAtBA,aAAa,MAAM,4BAA4B,EAAA,CAAG,OAsBlD;CACA,SAAS,CAAC,aAAa;CACvB;EApBA,sBAAsB,CAAC,SAAS,QAAQ;EACxC,wBAAwB;GAAC;GAAO;GAAU;EAAG;EAC7C,wBAAwB,CAAC,SAAS,QAAQ;EAC1C,0BAA0B;GAAC;GAAO;GAAU;EAAG;EAC/C,qBAAqB;GAAC;GAAO;GAAU;EAAG;EAC1C,cAAc;GAAC;GAAO;GAAU;EAAY;EAC5C,gBAAgB;GAAC;GAAO;GAAU,CAAC,eAAe;EAAC;EACnD,iBAAiB,CAAC,OAAO,OAAO;EAChC,4BAA4B,CAAC,OAAO,OAAO;EAC3C,qBAAqB;GAAC;GAAO;GAAS;EAAG;EACzC,aAAa;GAAC;GAAO;GAAU;EAAY;EAC3C,cAAc,CAAC,OAAO,OAAO;EAC7B,aAAa,CAAC,QAAQ;EACtB,sBAAsB;GAAC;GAAO;GAAU;EAAS;EACjD,sBAAsB,CAAC,OAAO,QAAQ;CAMtC;AACF;;ACnCA,MAAa,OAAO,OAAO,OAAO;CAEhC,aAAA;CAEA,MAAA;CAEA,SAAA;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/commitlint-config",
3
- "version": "3.31.0",
3
+ "version": "3.32.1",
4
4
  "description": "Commitlint configuration presets",
5
5
  "keywords": [
6
6
  "commitlint",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@commitlint/types": "^21.0.0",
41
- "@w5s/conventional-changelog": "^3.32.0"
41
+ "@w5s/conventional-changelog": "^3.34.0"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@commitlint/cli": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0"
@@ -54,5 +54,5 @@
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  },
57
- "gitHead": "22c5f0c577887c9855d4a6fa3c139e0e36a1bc6a"
57
+ "gitHead": "8c839f967fbc4477af3e767c4ecfa2d8a693eda0"
58
58
  }