From a97211c9f7810c64a821e0a2c9519f52a050408a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 09:58:18 +0000 Subject: [PATCH 1/2] chore(deps): update eslint and prettier packages --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c4425ae..22ec454 100644 --- a/package.json +++ b/package.json @@ -47,15 +47,15 @@ "@hapi/hapi": "20.3.0", "@semantic-release/changelog": "6.0.3", "@semantic-release/git": "10.0.1", - "eslint": "7.32.0", - "eslint-config-airbnb-base": "14.2.1", - "eslint-config-prettier": "8.10.0", + "eslint": "8.57.0", + "eslint-config-airbnb-base": "15.0.0", + "eslint-config-prettier": "9.1.0", "eslint-plugin-import": "2.28.1", - "eslint-plugin-prettier": "4.2.1", + "eslint-plugin-prettier": "5.1.3", "express": "4.18.2", "fastify": "4.22.1", "json-schema-to-typescript": "10.1.5", - "prettier": "2.8.8", + "prettier": "3.2.5", "semantic-release": "23.0.2", "stoppable": "1.1.0", "tap": "18.7.0", From bc319088a3604855d174b8eccbc2f38a69a0ea82 Mon Sep 17 00:00:00 2001 From: William Killerud Date: Thu, 7 Mar 2024 11:05:24 +0100 Subject: [PATCH 2/2] refactor: obey linter --- lib/validators/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/validators/index.js b/lib/validators/index.js index b3ff6b6..dfcf133 100644 --- a/lib/validators/index.js +++ b/lib/validators/index.js @@ -3,8 +3,9 @@ const semver = require('semver'); const npmPkg = require('validate-npm-package-name'); +const urlIsh = /^https?:\/\/[a-zA-Z0-9-_./]+(:[0-9]+)?/; const origin = (value) => { - if (new RegExp('^https?://[a-zA-Z0-9-_./]+(:[0-9]+)?').test(value)) { + if (urlIsh.test(value)) { return value.toLowerCase(); } throw new Error('Parameter "origin" is not valid');