Skip to content

Commit

Permalink
fix: eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
ttttmr committed Sep 24, 2024
1 parent a1aadee commit cf5f968
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/utils/ofetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const rofetch = createFetch().create({
}
if (config.feature.allow_cidr) {
const allowCIDR = ip.parseCIDR(config.feature.allow_cidr);
// eslint-disable-next-line unicorn/prefer-regexp-test
if (parsedIp.match(allowCIDR)) {

Check warning

Code scanning / ESLint

Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`. Warning

Prefer RegExp#test(…) over String#match(…).
return;
}
Expand Down

0 comments on commit cf5f968

Please sign in to comment.