!2 fix: 正则表达式 代码中没有使用捕获组问题

Merge pull request !2 from simple/div
This commit is contained in:
simple 2024-08-12 20:36:20 +00:00 committed by 玲娜贝er
parent 85ab87fae1
commit 16a21e084e
3 changed files with 2 additions and 10 deletions

View File

@ -121,7 +121,7 @@ async function generateAccess(options: GenerateMenuAndRoutesOptions) {
// 外链: http开头 & 组件为Layout || ParentView
// 正则判断是否为http://或者https://开头
if (
/^http(s)?:\/\//.test(menu.path) &&
/^https?:\/\//.test(menu.path) &&
(menu.component === 'Layout' || menu.component === 'ParentView')
) {
menu.component = 'Link';

View File

@ -58,7 +58,6 @@ const customConfig: Linter.Config[] = [
},
],
'perfectionist/sort-interfaces': 'off',
'regexp/no-unused-capturing-group': 'off',
},
},
{
@ -99,13 +98,6 @@ const customConfig: Linter.Config[] = [
],
},
},
{
files: ['packages/effects/access/**/**'],
ignores: restrictedImportIgnores,
rules: {
'regexp/no-unused-capturing-group': 'off',
},
},
{
// 不能引入@vben/*里面的包
files: [

View File

@ -27,7 +27,7 @@ async function generateAccessible(
/**
* menu处理
*/
if (/^http(s)?:\/\//.test(route.path)) {
if (/^https?:\/\//.test(route.path)) {
return;
}
router.addRoute(route);