refactor: add @types/validator

This commit is contained in:
Griffithtp 2019-07-13 07:53:23 +01:00
parent cca2c3c0d7
commit 5148fdca66
3 changed files with 7 additions and 1 deletions

View File

@ -23,6 +23,7 @@
"@types/react": "16.8.16",
"@types/react-dom": "16.8.4",
"@types/react-router-dom": "4.3.2",
"@types/validator": "10.11.1",
"@verdaccio/babel-preset": "0.2.1",
"@verdaccio/eslint-config": "0.0.1",
"@verdaccio/types": "6.1.0",

View File

@ -2,7 +2,7 @@ import isURLValidator from 'validator/lib/isURL';
import isEmailValidator from 'validator/lib/isEmail';
import '../../types';
export function isURL(url): boolean {
export function isURL(url: string): boolean {
return isURLValidator(url || '', {
protocols: ['http', 'https', 'git+https'],
require_protocol: true,

View File

@ -1743,6 +1743,11 @@
resolved "https://registry.verdaccio.org/@types%2funist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e"
integrity sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==
"@types/validator@10.11.1":
version "10.11.1"
resolved "https://registry.npmjs.org/@types/validator/-/validator-10.11.1.tgz#76e983ce155261838463b73728856cf8bc628d53"
integrity sha512-bVhLqvb+5xUNWRFnuuecRVISTvsG6AdhrB2kb/tChgtuTTqARqlQ3rLhOPy8cINZEUB8PkR+goyWF6fWxg4iSw==
"@types/vfile-message@*":
version "1.0.1"
resolved "https://registry.verdaccio.org/@types%2fvfile-message/-/vfile-message-1.0.1.tgz#e1e9895cc6b36c462d4244e64e6d0b6eaf65355a"