Skip to content

Commit 97a1fe5

Browse files
committed
fix: 更新 biome.json 以禁用 noExplicitAny 规则,改进错误处理以提示安装 assets-retry 包
1 parent 4589afd commit 97a1fe5

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

biome.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@
3232
"linter": {
3333
"enabled": true,
3434
"rules": {
35-
"recommended": true
35+
"recommended": true,
36+
"suspicious": {
37+
"noExplicitAny": "off"
38+
}
3639
}
3740
}
3841
}

src/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,16 @@ export default (api: IApi) => {
5454
cwd: api.cwd,
5555
dep: 'assets-retry',
5656
}) || dirname(require.resolve('assets-retry/package.json'));
57-
} catch (e) {}
57+
} catch (_) {
58+
throw new Error(
59+
`Can't find assets-retry package. Please install assets-retry first.`,
60+
);
61+
}
5862

5963
function checkPkgPath() {
6064
if (!pkgPath) {
6165
throw new Error(
62-
`Can't find assets-retry package. Please install antd first.`,
66+
`Can't find assets-retry package. Please install assets-retry first.`,
6367
);
6468
}
6569
}

0 commit comments

Comments
 (0)