Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d0edf3ca
authored
Jul 08, 2024
by
vince
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix(@vben/commitlint-config): scope is not suitable for scoped package names
1 parent
04a1533a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
10 deletions
internal/lint-configs/commitlint-config/package.json
internal/lint-configs/commitlint-config/src/index.ts
pnpm-lock.yaml
internal/lint-configs/commitlint-config/package.json
View file @
d0edf3c
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
"@commitlint/cli"
:
"^19.3.0"
,
"@commitlint/cli"
:
"^19.3.0"
,
"@commitlint/config-conventional"
:
"^19.2.2"
,
"@commitlint/config-conventional"
:
"^19.2.2"
,
"@vben/node-utils"
:
"workspace:*"
,
"@vben/node-utils"
:
"workspace:*"
,
"commitlint-plugin-function-rules"
:
"^4.0.0"
,
"cz-git"
:
"^1.9.3"
,
"cz-git"
:
"^1.9.3"
,
"czg"
:
"^1.9.3"
"czg"
:
"^1.9.3"
}
}
...
...
internal/lint-configs/commitlint-config/src/index.ts
View file @
d0edf3c
...
@@ -6,12 +6,8 @@ import { getPackagesSync } from '@vben/node-utils';
...
@@ -6,12 +6,8 @@ import { getPackagesSync } from '@vben/node-utils';
const
{
packages
}
=
getPackagesSync
();
const
{
packages
}
=
getPackagesSync
();
const
pkgs
=
packages
.
map
((
pkg
)
=>
{
const
allowedScopes
=
[
return
pkg
.
packageJson
.
name
?.
replace
(
'@vben-core/'
,
''
);
...
packages
.
map
((
pkg
)
=>
pkg
.
packageJson
.
name
),
});
const
scopes
=
[
...
pkgs
,
'project'
,
'project'
,
'style'
,
'style'
,
'lint'
,
'lint'
,
...
@@ -33,6 +29,7 @@ const scopeComplete = execSync('git status --porcelain || true')
...
@@ -33,6 +29,7 @@ const scopeComplete = execSync('git status --porcelain || true')
const
userConfig
:
UserConfig
=
{
const
userConfig
:
UserConfig
=
{
extends
:
[
'@commitlint/config-conventional'
],
extends
:
[
'@commitlint/config-conventional'
],
plugins
:
[
'commitlint-plugin-function-rules'
],
prompt
:
{
prompt
:
{
/** @use `pnpm commit :f` */
/** @use `pnpm commit :f` */
alias
:
{
alias
:
{
...
@@ -103,15 +100,27 @@ const userConfig: UserConfig = {
...
@@ -103,15 +100,27 @@ const userConfig: UserConfig = {
*/
*/
'footer-leading-blank'
:
[
1
,
'always'
],
'footer-leading-blank'
:
[
1
,
'always'
],
/**
/**
* type[scope]: [function] description
[No more than 108 characters]
* type[scope]: [function] description
* ^^^^^
* ^^^^^
*/
*/
'header-max-length'
:
[
2
,
'always'
,
108
],
'function-rules/scope-enum'
:
[
2
,
// level: error
'always'
,
(
parsed
:
{
scope
:
string
})
=>
{
if
(
!
parsed
.
scope
||
allowedScopes
.
includes
(
parsed
.
scope
))
{
return
[
true
];
}
return
[
false
,
`scope must be one of
${
allowedScopes
.
join
(
', '
)}
`
];
},
],
/**
/**
* type[scope]: [function] description
* type[scope]: [function] description
[No more than 108 characters]
* ^^^^^
* ^^^^^
*/
*/
'scope-enum'
:
[
2
,
'always'
,
scopes
],
'header-max-length'
:
[
2
,
'always'
,
108
],
'scope-enum'
:
[
0
],
'subject-case'
:
[
0
],
'subject-case'
:
[
0
],
'subject-empty'
:
[
2
,
'never'
],
'subject-empty'
:
[
2
,
'never'
],
'type-empty'
:
[
2
,
'never'
],
'type-empty'
:
[
2
,
'never'
],
...
...
pnpm-lock.yaml
View file @
d0edf3c
...
@@ -255,6 +255,9 @@ importers:
...
@@ -255,6 +255,9 @@ importers:
'
@vben/node-utils'
:
'
@vben/node-utils'
:
specifier
:
workspace:*
specifier
:
workspace:*
version
:
link:../../node-utils
version
:
link:../../node-utils
commitlint-plugin-function-rules
:
specifier
:
^4.0.0
version
:
4.0.0(@commitlint/lint@19.2.2)
cz-git
:
cz-git
:
specifier
:
^1.9.3
specifier
:
^1.9.3
version
:
1.9.3
version
:
1.9.3
...
@@ -3221,6 +3224,7 @@ packages:
...
@@ -3221,6 +3224,7 @@ packages:
'
@ls-lint/ls-lint@2.2.3'
:
'
@ls-lint/ls-lint@2.2.3'
:
resolution
:
{
integrity
:
sha512-ekM12jNm/7O2I/hsRv9HvYkRdfrHpiV1epVuI2NP+eTIcEgdIdKkKCs9KgQydu/8R5YXTov9aHdOgplmCHLupw==
}
resolution
:
{
integrity
:
sha512-ekM12jNm/7O2I/hsRv9HvYkRdfrHpiV1epVuI2NP+eTIcEgdIdKkKCs9KgQydu/8R5YXTov9aHdOgplmCHLupw==
}
cpu
:
[
x64
,
arm64
,
s390x
]
os
:
[
darwin
,
linux
,
win32
]
os
:
[
darwin
,
linux
,
win32
]
hasBin
:
true
hasBin
:
true
...
@@ -4682,6 +4686,12 @@ packages:
...
@@ -4682,6 +4686,12 @@ packages:
resolution
:
{
integrity
:
sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==
}
resolution
:
{
integrity
:
sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==
}
engines
:
{
node
:
'
>=
12.0.0'
}
engines
:
{
node
:
'
>=
12.0.0'
}
commitlint-plugin-function-rules@4.0.0
:
resolution
:
{
integrity
:
sha512-ddZAgEm4MtgwHiPCb/mFpPeN2mW/doN7l14Lt9g2nFV3NpZVL0RJ6hFU/JJuEqRTVBlji/qmGzMeNR8qZ9BXfw==
}
engines
:
{
node
:
'
>=20'
}
peerDependencies
:
'
@commitlint/lint'
:
'
>=19
<20'
common-tags@1.8.2
:
common-tags@1.8.2
:
resolution
:
{
integrity
:
sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==
}
resolution
:
{
integrity
:
sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==
}
engines
:
{
node
:
'
>=4.0.0'
}
engines
:
{
node
:
'
>=4.0.0'
}
...
@@ -13689,6 +13699,10 @@ snapshots:
...
@@ -13689,6 +13699,10 @@ snapshots:
comment-parser@1.4.1
:
{}
comment-parser@1.4.1
:
{}
commitlint-plugin-function-rules@4.0.0(@commitlint/lint@19.2.2)
:
dependencies
:
'
@commitlint/lint'
:
19.2.2
common-tags@1.8.2
:
{}
common-tags@1.8.2
:
{}
commondir@1.0.1
:
{}
commondir@1.0.1
:
{}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment