Migrate conversations to ESLint

This commit is contained in:
Chris Svenningsen 2020-09-14 12:51:27 -07:00 committed by Josh Perez
parent b4f0f3c685
commit 372aa44e49
90 changed files with 1261 additions and 1165 deletions

View file

@ -7,16 +7,13 @@ import { storiesOf } from '@storybook/react';
import { pngUrl } from '../../storybook/Fixtures';
import { Image, Props } from './Image';
import { IMAGE_PNG } from '../../types/MIME';
// @ts-ignore
import { setup as setupI18n } from '../../../js/modules/i18n';
// @ts-ignore
import enMessages from '../../../_locales/en/messages.json';
const i18n = setupI18n('en', enMessages);
const story = storiesOf('Components/Conversation/Image', module);
// tslint:disable-next-line:cyclomatic-complexity
const createProps = (overrideProps: Partial<Props> = {}): Props => ({
alt: text('alt', overrideProps.alt || ''),
attachment: overrideProps.attachment || {
@ -170,6 +167,7 @@ story.add('Blurhash', () => {
const props = {
...defaultProps,
blurHash: 'thisisafakeblurhashthatwasmadeup',
// eslint-disable-next-line @typescript-eslint/no-explicit-any
url: undefined as any,
};
@ -179,7 +177,9 @@ story.add('Missing Image', () => {
const defaultProps = createProps();
const props = {
...defaultProps,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
attachment: undefined as any,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
url: undefined as any,
};