chore(deps): update dependency prettier to v2.3.0 (#42074)
* chore(deps): update dependency prettier to v2.3.0 * chore: apply formating per prettier * fix: correctly disable import/no-unresolved Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Mrugesh Mohapatra <hi@mrugesh.dev> Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@@ -2,8 +2,10 @@ import React from 'react';
|
||||
import { Trans } from 'react-i18next';
|
||||
|
||||
// Matches editor links for: Replit, Glitch, CodeSandbox, GitHub
|
||||
const editorRegex = /repl\.?it(\.com)?\/(@|join\/)|glitch\.com\/edit\/#!|codesandbox\.io\/s\/|github\.com/;
|
||||
const fCCRegex = /codepen\.io\/freecodecamp|freecodecamp\.rocks|github\.com\/freecodecamp/i;
|
||||
const editorRegex =
|
||||
/repl\.?it(\.com)?\/(@|join\/)|glitch\.com\/edit\/#!|codesandbox\.io\/s\/|github\.com/;
|
||||
const fCCRegex =
|
||||
/codepen\.io\/freecodecamp|freecodecamp\.rocks|github\.com\/freecodecamp/i;
|
||||
const localhostRegex = /localhost:/;
|
||||
const httpRegex = /http(?!s|([^s]+?localhost))/;
|
||||
|
||||
@@ -21,5 +23,7 @@ export const localhostValidator = value =>
|
||||
export const httpValidator = value =>
|
||||
httpRegex.test(value) ? <Trans>validation.http-url</Trans> : null;
|
||||
|
||||
export const composeValidators = (...validators) => value =>
|
||||
validators.reduce((error, validator) => error ?? validator?.(value), null);
|
||||
export const composeValidators =
|
||||
(...validators) =>
|
||||
value =>
|
||||
validators.reduce((error, validator) => error ?? validator?.(value), null);
|
||||
|
Reference in New Issue
Block a user