@w5s/commitlint-config 3.1.2 → 3.1.4
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 +3 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +9 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as _commitlint_types0 from "@commitlint/types";
|
|
1
|
+
import * as _$_commitlint_types0 from "@commitlint/types";
|
|
2
2
|
|
|
3
3
|
//#region src/meta.d.ts
|
|
4
4
|
declare const meta: Readonly<{
|
|
@@ -12,8 +12,8 @@ declare const config: {
|
|
|
12
12
|
parserPreset: {
|
|
13
13
|
parserOpts: any;
|
|
14
14
|
};
|
|
15
|
-
rules: Partial<_commitlint_types0.RulesConfig<_commitlint_types0.RuleConfigQuality.Qualified>>;
|
|
16
|
-
plugins: _commitlint_types0.Plugin[];
|
|
15
|
+
rules: Partial<_$_commitlint_types0.RulesConfig<_$_commitlint_types0.RuleConfigQuality.Qualified>>;
|
|
16
|
+
plugins: _$_commitlint_types0.Plugin[];
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
19
19
|
export { config as default, meta };
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/meta.ts","../src/plugin.ts","../src/config.ts"],"sourcesContent":["export const meta = Object.freeze({\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 // @ts-ignore - these variables are injected at build time\n buildNumber: 1 as number, // (typeof __PACKAGE_BUILD_NUMBER__ === 'undefined' ? 0 : __PACKAGE_BUILD_NUMBER__) as number,\n});\n","import type { Plugin, Rule, RuleConfigCondition } from '@commitlint/types';\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<'unicode' | 'emoji'> = (parsed, when = 'always', value = 'unicode') => {\n const isUnicode = parsed.type != null && Emoji.isUnicode(parsed.type);\n const isEmoji = parsed.type != null && Emoji.isText(parsed.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 isValidGitmoji = parsed.type != null && GitmojiCode.isValid(parsed.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 { RuleConfigSeverity, type QualifiedRules, type LintOptions } from '@commitlint/types';\nimport conventionalChangelogPreset from '@w5s/conventional-changelog';\nimport { gitmojiPlugin } from './plugin.js';\n\nconst { Error, Warning, Disabled } = RuleConfigSeverity;\n\nconst parserPreset = {\n // eslint-disable-next-line unicorn/no-await-expression-member\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 rules,\n plugins: [gitmojiPlugin],\n};\n"],"mappings":";;;AAAA,MAAa,OAAO,OAAO,OAAO;CAEhC,MAAA;CAEA,SAAA;CAEA,aAAa;CACd,CAAC;;;ACJF,MAAM,OACH,OAAwC,cACtC,SACC,SAAS,WAAW,OAAO,CAAC;AAElC,MAAa,oBAA+C,QAAQ,OAAO,UAAU,QAAQ,cAAc;CACzG,MAAM,YAAY,OAAO,QAAQ,QAAQ,MAAM,UAAU,OAAO,KAAK;CACrE,MAAM,UAAU,OAAO,QAAQ,QAAQ,MAAM,OAAO,OAAO,KAAK;
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/meta.ts","../src/plugin.ts","../src/config.ts"],"sourcesContent":["export const meta = Object.freeze({\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 // @ts-ignore - these variables are injected at build time\n buildNumber: 1 as number, // (typeof __PACKAGE_BUILD_NUMBER__ === 'undefined' ? 0 : __PACKAGE_BUILD_NUMBER__) as number,\n});\n","import type { Plugin, Rule, RuleConfigCondition } from '@commitlint/types';\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<'unicode' | 'emoji'> = (parsed, when = 'always', value = 'unicode') => {\n const isUnicode = parsed.type != null && Emoji.isUnicode(parsed.type);\n const isEmoji = parsed.type != null && Emoji.isText(parsed.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 isValidGitmoji = parsed.type != null && GitmojiCode.isValid(parsed.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 { RuleConfigSeverity, type QualifiedRules, type LintOptions } from '@commitlint/types';\nimport conventionalChangelogPreset from '@w5s/conventional-changelog';\nimport { gitmojiPlugin } from './plugin.js';\n\nconst { Error, Warning, Disabled } = RuleConfigSeverity;\n\nconst parserPreset = {\n // eslint-disable-next-line unicorn/no-await-expression-member\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 rules,\n plugins: [gitmojiPlugin],\n};\n"],"mappings":";;;AAAA,MAAa,OAAO,OAAO,OAAO;CAEhC,MAAA;CAEA,SAAA;CAEA,aAA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GAAC;GAAO;GAAU;GAAa;EAC5C,cAAc,CAAC,OAAO,QAAQ;EAC9B,aAAa,CAAC,SAAS;EACvB,sBAAsB;GAAC;GAAO;GAAU;GAAU;EAClD,sBAAsB,CAAC,OAAO,SAAS;EAKvC;CACA,SAAS,CAAC,cAAc;CACzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@w5s/commitlint-config",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
4
4
|
"description": "Commitlint configuration presets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"commitlint",
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
"import": {
|
|
25
25
|
"types": "./dist/index.d.ts",
|
|
26
26
|
"default": "./dist/index.js"
|
|
27
|
+
},
|
|
28
|
+
"require": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"default": "./dist/index.js"
|
|
27
31
|
}
|
|
28
32
|
},
|
|
29
33
|
"./dist/*": "./dist/*"
|
|
@@ -43,10 +47,10 @@
|
|
|
43
47
|
},
|
|
44
48
|
"dependencies": {
|
|
45
49
|
"@commitlint/types": "^20.0.0",
|
|
46
|
-
"@w5s/conventional-changelog": "^3.1.
|
|
50
|
+
"@w5s/conventional-changelog": "^3.1.4"
|
|
47
51
|
},
|
|
48
52
|
"peerDependencies": {
|
|
49
|
-
"@commitlint/cli": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0"
|
|
53
|
+
"@commitlint/cli": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0"
|
|
50
54
|
},
|
|
51
55
|
"peerDependenciesMeta": {
|
|
52
56
|
"@commitlint/cli": {
|
|
@@ -54,11 +58,11 @@
|
|
|
54
58
|
}
|
|
55
59
|
},
|
|
56
60
|
"engines": {
|
|
57
|
-
"node": ">=
|
|
61
|
+
"node": ">=22.0.0"
|
|
58
62
|
},
|
|
59
63
|
"publishConfig": {
|
|
60
64
|
"access": "public"
|
|
61
65
|
},
|
|
62
66
|
"sideEffect": false,
|
|
63
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "38cf5f5877af4c8a1c292b9b7039c5a11863fc00"
|
|
64
68
|
}
|