!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开头 & 组件为Layout || ParentView
// 正则判断是否为http://或者https://开头 // 正则判断是否为http://或者https://开头
if ( if (
/^http(s)?:\/\//.test(menu.path) && /^https?:\/\//.test(menu.path) &&
(menu.component === 'Layout' || menu.component === 'ParentView') (menu.component === 'Layout' || menu.component === 'ParentView')
) { ) {
menu.component = 'Link'; menu.component = 'Link';

View File

@ -58,7 +58,6 @@ const customConfig: Linter.Config[] = [
}, },
], ],
'perfectionist/sort-interfaces': 'off', '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/*里面的包 // 不能引入@vben/*里面的包
files: [ files: [

View File

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