Skip to content

Commit

Permalink
chore: fix no-unescaped-entities eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
robinpyon committed Nov 3, 2023
1 parent e54dca2 commit beadbde
Show file tree
Hide file tree
Showing 18 changed files with 59 additions and 40 deletions.
2 changes: 1 addition & 1 deletion dev/test-studio/schema/debug/fieldComponentsTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default {
description: (
<span>
Subtitle description <span style={{color: 'red'}}>x ← x - (JᵀJ + λIₙ༝ₙ)⁻¹ Jᵀr</span>
<script>window.alert('👻')</script>
<script>window.alert(&apos;👻&apos;)</script>
</span>
),
type: 'string',
Expand Down
4 changes: 2 additions & 2 deletions packages/@sanity/vision/src/components/PerspectivePopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export function PerspectivePopover() {

<Card>
<Text muted>
Perspectives allow your query to run against different "views" of the content in
your dataset
Perspectives allow your query to run against different &quot;views&quot; of the
content in your dataset
</Text>
</Card>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default function Block(props: {
diff={diff.origin.fields.style}
>
<Text size={0}>
Changed block style from '{fromStyle}' to '{block.style}'
Changed block style from &apos;{fromStyle}&apos; to &apos;{block.style}&apos;
</Text>
</DiffTooltip>
<Box style={style}>{returned}</Box>
Expand Down
7 changes: 4 additions & 3 deletions packages/sanity/src/core/form/components/FormInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ const FormInputInner = memo(function FormInputInner(
const key = (relativePath[0] as any)._key
return (
<div>
No array item with _key <code>"{key}"</code> found at path {JSON.stringify(props.path)}
No array item with _key <code>&quot;{key}&quot;</code> found at path{' '}
{JSON.stringify(props.path)}
</div>
)
}
Expand Down Expand Up @@ -238,8 +239,8 @@ const FormInputInner = memo(function FormInputInner(
const fieldName = childPath[0]
return (
<div>
Field {JSON.stringify(fieldName)} not found among members – please verify that it's both
defined in the schema and that it has not been conditionally hidden.
Field {JSON.stringify(fieldName)} not found among members – please verify that it&apos;s
both defined in the schema and that it has not been conditionally hidden.
</div>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,14 @@ export function CrossDatasetReferenceInput(props: CrossDatasetReferenceInputProp
<Text as="p" muted size={1}>
{schemaType.weak ? (
<>
It will not be possible to delete the "{preview?.title}"-document
without first removing this reference.
It will not be possible to delete the &quot;{preview?.title}
&quot;-document without first removing this reference.
</>
) : (
<>
This makes it possible to delete the "{preview?.title}"-document without
first deleting this reference, leaving this field referencing a
nonexisting document.
This makes it possible to delete the &quot;{preview?.title}
&quot;-document without first deleting this reference, leaving this
field referencing a nonexisting document.
</>
)}
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export function DisabledFeatureWarning({value, onClearValue}: Props) {
</a>
</Text>
<Text as="p" size={1}>
You can still clear this field's existing reference, but that cannot be revoked as
long as the feature is disabled.
You can still clear this field&apos;s existing reference, but that cannot be revoked
as long as the feature is disabled.
</Text>
</Stack>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ export function OptionPreview(props: {
if (!refType) {
return (
<Stack space={2} padding={1}>
Search returned a type that's not valid for this reference: "${referenceInfo.type}"
Search returned a type that&apos;s not valid for this reference: &quot;${referenceInfo.type}
&quot;
</Stack>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export function OptionPreview(props: {
if (!refType) {
return (
<Stack space={2} padding={1}>
Search returned a type that's not valid for this reference: "${referenceInfo.type}"
Search returned a type that&apos;s not valid for this reference: &quot;${referenceInfo.type}
&quot;
</Stack>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,21 @@ export function ReferenceField(props: ReferenceFieldProps) {
{schemaType.weak ? (
<>
It will not be possible to delete the{' '}
{preview?.title ? <>"{preview?.title}"-document</> : <>referenced document</>}{' '}
{preview?.title ? (
<>&quot;{preview?.title}&quot;-document</>
) : (
<>referenced document</>
)}{' '}
without first removing this reference.
</>
) : (
<>
This makes it possible to delete the{' '}
{preview?.title ? <>"{preview?.title}"-document</> : <>referenced document</>}{' '}
{preview?.title ? (
<>&quot;{preview?.title}&quot;-document</>
) : (
<>referenced document</>
)}{' '}
without first deleting this reference, leaving this field referencing a
nonexisting document.
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export function ReferenceInput(props: ReferenceInputProps) {
}
>
<Text size={1}>
This field is currently referencing a document that doesn't exist (ID:
This field is currently referencing a document that doesn&apos;t exist (ID:
<code>{value._ref}</code>). You can either remove the reference or replace it with
another document.
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,21 @@ export function ReferenceItem<Item extends ReferenceItemValue = ReferenceItemVal
{schemaType.weak ? (
<>
It will not be possible to delete the{' '}
{preview?.title ? <>"{preview?.title}"-document</> : <>referenced document</>}{' '}
{preview?.title ? (
<>&quot;{preview?.title}&quot;-document</>
) : (
<>referenced document</>
)}{' '}
without first removing this reference.
</>
) : (
<>
This makes it possible to delete the{' '}
{preview?.title ? <>"{preview?.title}"-document</> : <>referenced document</>}{' '}
{preview?.title ? (
<>&quot;{preview?.title}&quot;-document</>
) : (
<>referenced document</>
)}{' '}
without first deleting this reference, leaving this field referencing a
nonexisting document.
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function DropMessage(props: Props) {
</Text>
<Text muted size={1}>
{rejectedFilesCount} file
{rejectedFilesCount > 1 ? 's' : ''} can't be uploaded here
{rejectedFilesCount > 1 ? 's' : ''} can&apos;t be uploaded here
</Text>
</Inline>
</Box>
Expand All @@ -54,7 +54,7 @@ export function DropMessage(props: Props) {
<AccessDeniedIcon />
</Text>
<Text>
Can't upload {hoveringFiles.length > 1 ? 'any of these files' : 'this file'} here
Can&apos;t upload {hoveringFiles.length > 1 ? 'any of these files' : 'this file'} here
</Text>
</Inline>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export const ConfirmMessage = ({asset, assetType, hasResults = false}: ConfirmMe
<WarningOutlineIcon />
</Text>
<Text size={1}>
{filenamePlaceholder} cannot be deleted because it's being used. In order to delete
the {assetType} you need the remove all uses of it.
{filenamePlaceholder} cannot be deleted because it&apos;s being used. In order to
delete the {assetType} you need the remove all uses of it.
</Text>
</Flex>
{isImage && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export function AddFilterPopoverContent({onClose}: AddFilterPopoverContentProps)
{filteredMenuItems.length == 0 && (
<Box padding={3}>
<Text muted size={1} textOverflow="ellipsis">
No matches for '{titleFilter}'
No matches for &apos;{titleFilter}&apos;
</Text>
</Box>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export function DocumentTypesPopoverContent() {
{!documentTypeItems.length && (
<Box padding={3}>
<Text muted size={1} textOverflow="ellipsis">
No matches for '{typeFilter}'
No matches for &apos;{typeFilter}&apos;
</Text>
</Box>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function AssetSourceError(props: ResponsivePaddingProps) {
Currently, only the default asset source is supported.
</TextWithTone>
<TextWithTone size={1} tone="caution">
Please ensure it's enabled in your studio configuration file.
Please ensure it&apos;s enabled in your studio configuration file.
</TextWithTone>
</Stack>
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function SchemaProblemGroups(props: {problemGroups: SchemaValidationProbl
<Text size={1} weight="semibold">
{schemaType ? (
<>
{capitalize(schemaType.type)} type "{schemaType.name}"
{capitalize(schemaType.type)} type &quot;{schemaType.name}&quot;
</>
) : null}
</Text>
Expand Down
22 changes: 11 additions & 11 deletions packages/sanity/src/ui/__workshop__/MenuItemStory.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {CheckmarkIcon, CircleIcon, WarningOutlineIcon} from '@sanity/icons'
import {Avatar, Box, Card, Container, Menu, MenuDivider, Text, Flex} from '@sanity/ui'
import {hues} from '@sanity/color'
import {CheckmarkIcon, CircleIcon} from '@sanity/icons'
import {Avatar, Box, Card, Container, Menu, MenuDivider, Text} from '@sanity/ui'
import {useString} from '@sanity/ui-workshop'
import React from 'react'
import {MenuItem} from '../menuItem'
import {hues} from '@sanity/color'

const HOTKEYS = ['Ctrl', 'Alt', 'P']
const AVATAR_INITIALS = 'A.W.'
Expand Down Expand Up @@ -42,20 +42,20 @@ export default function MenuItemStory() {
<Text size={1}>Not recommended</Text>
</Box>
<Box paddingX={2} paddingTop={2}>
<Text size={0}> Don't use left icons in large menu items</Text>
<Text size={0}> Don&apos;t use left icons in large menu items</Text>
</Box>

<MenuItem icon={CircleIcon} text={text} subtitle={subtitle} />
<Box paddingX={2} paddingTop={2}>
<Text size={0}>Don't use keyboard shortcuts with large menu items</Text>
<Text size={0}>Don&apos;t use keyboard shortcuts with large menu items</Text>
</Box>
<MenuItem text={text} hotkeys={HOTKEYS} subtitle={subtitle} />
<Box paddingX={2} paddingTop={2}>
<Text size={0}>Don't use badges in small menu items</Text>
<Text size={0}>Don&apos;t use badges in small menu items</Text>
</Box>
<MenuItem text={text} badgeText={'badge'} />
<Box paddingX={2} paddingTop={2}>
<Text size={0}>Don't use icons and previews in the same item</Text>
<Text size={0}>Don&apos;t use icons and previews in the same item</Text>
</Box>
<MenuItem
icon={CircleIcon}
Expand All @@ -69,19 +69,19 @@ export default function MenuItemStory() {
subtitle={subtitle}
/>
<Box paddingX={2} paddingTop={2}>
<Text size={0}>Don't use icon right and hotkeys in the same item</Text>
<Text size={0}>Don&apos;t use icon right and hotkeys in the same item</Text>
</Box>
<MenuItem icon={CircleIcon} text={text} iconRight={CheckmarkIcon} hotkeys={HOTKEYS} />
<Box paddingX={2} paddingTop={2}>
<Text size={0}>Don't use icon right and badge in the same item</Text>
<Text size={0}>Don&apos;t use icon right and badge in the same item</Text>
</Box>
<MenuItem icon={CircleIcon} text={text} iconRight={CheckmarkIcon} badgeText={'badge'} />
<Box paddingX={2} paddingTop={2}>
<Text size={0}>Don't use hotkeys and badge in the same item</Text>
<Text size={0}>Don&apos;t use hotkeys and badge in the same item</Text>
</Box>
<MenuItem icon={CircleIcon} text={text} hotkeys={HOTKEYS} badgeText={'badge'} />
<Box paddingX={2} paddingTop={2}>
<Text size={0}>Don't use everything at once</Text>
<Text size={0}>Don&apos;t use everything at once</Text>
</Box>
<MenuItem
icon={CircleIcon}
Expand Down

0 comments on commit beadbde

Please sign in to comment.