Update eslint to 8.27.0
This commit is contained in:
parent
c8fb43a846
commit
98ef4c627a
499 changed files with 8995 additions and 8494 deletions
|
@ -61,16 +61,16 @@ const useProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
|
|||
theme: React.useContext(StorybookThemeContext),
|
||||
});
|
||||
|
||||
export const Default = (): JSX.Element => {
|
||||
export function Default(): JSX.Element {
|
||||
const props = useProps({
|
||||
from: someone,
|
||||
to: me,
|
||||
});
|
||||
|
||||
return <MessageSearchResult {...props} />;
|
||||
};
|
||||
}
|
||||
|
||||
export const SenderHasABadge = (): JSX.Element => {
|
||||
export function SenderHasABadge(): JSX.Element {
|
||||
const props = useProps({
|
||||
from: { ...someone, badges: [{ id: 'sender badge' }] },
|
||||
to: me,
|
||||
|
@ -84,13 +84,13 @@ export const SenderHasABadge = (): JSX.Element => {
|
|||
});
|
||||
|
||||
return <MessageSearchResult {...props} />;
|
||||
};
|
||||
}
|
||||
|
||||
SenderHasABadge.story = {
|
||||
name: 'Sender has a badge',
|
||||
};
|
||||
|
||||
export const Selected = (): JSX.Element => {
|
||||
export function Selected(): JSX.Element {
|
||||
const props = useProps({
|
||||
from: someone,
|
||||
to: me,
|
||||
|
@ -98,18 +98,18 @@ export const Selected = (): JSX.Element => {
|
|||
});
|
||||
|
||||
return <MessageSearchResult {...props} />;
|
||||
};
|
||||
}
|
||||
|
||||
export const FromYou = (): JSX.Element => {
|
||||
export function FromYou(): JSX.Element {
|
||||
const props = useProps({
|
||||
from: me,
|
||||
to: someone,
|
||||
});
|
||||
|
||||
return <MessageSearchResult {...props} />;
|
||||
};
|
||||
}
|
||||
|
||||
export const SearchingInConversation = (): JSX.Element => {
|
||||
export function SearchingInConversation(): JSX.Element {
|
||||
const props = useProps({
|
||||
from: me,
|
||||
to: someone,
|
||||
|
@ -117,52 +117,52 @@ export const SearchingInConversation = (): JSX.Element => {
|
|||
});
|
||||
|
||||
return <MessageSearchResult {...props} />;
|
||||
};
|
||||
}
|
||||
|
||||
SearchingInConversation.story = {
|
||||
name: 'Searching in Conversation',
|
||||
};
|
||||
|
||||
export const FromYouToYourself = (): JSX.Element => {
|
||||
export function FromYouToYourself(): JSX.Element {
|
||||
const props = useProps({
|
||||
from: me,
|
||||
to: me,
|
||||
});
|
||||
|
||||
return <MessageSearchResult {...props} />;
|
||||
};
|
||||
}
|
||||
|
||||
FromYouToYourself.story = {
|
||||
name: 'From You to Yourself',
|
||||
};
|
||||
|
||||
export const FromYouToGroup = (): JSX.Element => {
|
||||
export function FromYouToGroup(): JSX.Element {
|
||||
const props = useProps({
|
||||
from: me,
|
||||
to: group,
|
||||
});
|
||||
|
||||
return <MessageSearchResult {...props} />;
|
||||
};
|
||||
}
|
||||
|
||||
FromYouToGroup.story = {
|
||||
name: 'From You to Group',
|
||||
};
|
||||
|
||||
export const FromSomeoneToGroup = (): JSX.Element => {
|
||||
export function FromSomeoneToGroup(): JSX.Element {
|
||||
const props = useProps({
|
||||
from: someone,
|
||||
to: group,
|
||||
});
|
||||
|
||||
return <MessageSearchResult {...props} />;
|
||||
};
|
||||
}
|
||||
|
||||
FromSomeoneToGroup.story = {
|
||||
name: 'From Someone to Group',
|
||||
};
|
||||
|
||||
export const LongSearchResult = (): JSX.Element => {
|
||||
export function LongSearchResult(): JSX.Element {
|
||||
const snippets = [
|
||||
'This is a really <<left>>detail<<right>>ed long line which will wrap and only be cut off after it gets to three lines. So maybe this will make it in as well?',
|
||||
"Okay, here are the <<left>>detail<<right>>s:\n\n1355 Ridge Way\nCode: 234\n\nI'm excited!",
|
||||
|
@ -186,19 +186,19 @@ export const LongSearchResult = (): JSX.Element => {
|
|||
<MessageSearchResult {...props2} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export const EmptyShouldBeInvalid = (): JSX.Element => {
|
||||
export function EmptyShouldBeInvalid(): JSX.Element {
|
||||
const props = useProps();
|
||||
|
||||
return <MessageSearchResult {...props} />;
|
||||
};
|
||||
}
|
||||
|
||||
EmptyShouldBeInvalid.story = {
|
||||
name: 'Empty (should be invalid)',
|
||||
};
|
||||
|
||||
export const Mention = (): JSX.Element => {
|
||||
export function Mention(): JSX.Element {
|
||||
const props = useProps({
|
||||
body: 'moss banana twine sound lake zoo brain count vacuum work stairs try power forget hair dry diary years no results \uFFFC elephant sorry umbrella potato igloo kangaroo home Georgia bayonet vector orange forge diary zebra turtle rise front \uFFFC',
|
||||
bodyRanges: [
|
||||
|
@ -224,13 +224,13 @@ export const Mention = (): JSX.Element => {
|
|||
});
|
||||
|
||||
return <MessageSearchResult {...props} />;
|
||||
};
|
||||
}
|
||||
|
||||
Mention.story = {
|
||||
name: '@mention',
|
||||
};
|
||||
|
||||
export const MentionRegexp = (): JSX.Element => {
|
||||
export function MentionRegexp(): JSX.Element {
|
||||
const props = useProps({
|
||||
body: '\uFFFC This is a (long) /text/ ^$ that is ... specially **crafted** to (test) our regexp escaping mechanism! Making sure that the code we write works in all sorts of scenarios',
|
||||
bodyRanges: [
|
||||
|
@ -249,13 +249,13 @@ export const MentionRegexp = (): JSX.Element => {
|
|||
});
|
||||
|
||||
return <MessageSearchResult {...props} />;
|
||||
};
|
||||
}
|
||||
|
||||
MentionRegexp.story = {
|
||||
name: '@mention regexp',
|
||||
};
|
||||
|
||||
export const MentionNoMatches = (): JSX.Element => {
|
||||
export function MentionNoMatches(): JSX.Element {
|
||||
const props = useProps({
|
||||
body: '\uFFFC hello',
|
||||
bodyRanges: [
|
||||
|
@ -273,7 +273,7 @@ export const MentionNoMatches = (): JSX.Element => {
|
|||
});
|
||||
|
||||
return <MessageSearchResult {...props} />;
|
||||
};
|
||||
}
|
||||
|
||||
MentionNoMatches.story = {
|
||||
name: '@mention no-matches',
|
||||
|
@ -311,7 +311,7 @@ _MentionNoMatches.story = {
|
|||
name: '@mention no-matches',
|
||||
};
|
||||
|
||||
export const DoubleMention = (): JSX.Element => {
|
||||
export function DoubleMention(): JSX.Element {
|
||||
const props = useProps({
|
||||
body: 'Hey \uFFFC \uFFFC test',
|
||||
bodyRanges: [
|
||||
|
@ -336,7 +336,7 @@ export const DoubleMention = (): JSX.Element => {
|
|||
});
|
||||
|
||||
return <MessageSearchResult {...props} />;
|
||||
};
|
||||
}
|
||||
|
||||
DoubleMention.story = {
|
||||
name: 'Double @mention',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue