diff --git a/apps/web-antd/src/router/access.ts b/apps/web-antd/src/router/access.ts index adee0d7f..e9c5beb0 100644 --- a/apps/web-antd/src/router/access.ts +++ b/apps/web-antd/src/router/access.ts @@ -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'; diff --git a/internal/lint-configs/eslint-config/src/custom-config.ts b/internal/lint-configs/eslint-config/src/custom-config.ts index f9410062..5e9d05d9 100644 --- a/internal/lint-configs/eslint-config/src/custom-config.ts +++ b/internal/lint-configs/eslint-config/src/custom-config.ts @@ -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: [ diff --git a/packages/effects/access/src/accessible.ts b/packages/effects/access/src/accessible.ts index 46d6e53a..f250c3b4 100644 --- a/packages/effects/access/src/accessible.ts +++ b/packages/effects/access/src/accessible.ts @@ -27,7 +27,7 @@ async function generateAccessible( /** * 外链不应该被添加到路由 由menu处理 */ - if (/^http(s)?:\/\//.test(route.path)) { + if (/^https?:\/\//.test(route.path)) { return; } router.addRoute(route);