Skip to content

Commit

Permalink
fix(eslint): Add missing ESLint rule for TypeScript (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
tassoevan authored Jun 16, 2021
1 parent e393d98 commit cc0d498
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions packages/eslint-config-alt/typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
argsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-use-before-define': ['error'],
'func-call-spacing': 'off',
'indent': 'off',
'import/order': [
Expand Down
12 changes: 6 additions & 6 deletions packages/fuselage/src/components/Message/Metrics/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ const ContentItem: FC = (props) => (
<div className='rcx-message-metrics__content-item' {...props} />
);

export const Reply: FC<ComponentProps<typeof Button>> = (props) => (
<MetricsItem>
<Button {...props} {...{ small: true, primary: true }} />
</MetricsItem>
);

type IconProps = { name: 'thread' | 'user' | 'clock' | 'discussion' };
type FollowingProps = { name: 'bell' | 'bell-off' };

Expand Down Expand Up @@ -47,6 +41,12 @@ const MetricsFollowing: FC<FollowingProps> = ({ name }) => (
/>
);

export const Reply: FC<ComponentProps<typeof Button>> = (props) => (
<MetricsItem>
<Button {...props} {...{ small: true, primary: true }} />
</MetricsItem>
);

Metrics.Reply = Reply;

Metrics.Item = MetricsItem;
Expand Down
10 changes: 5 additions & 5 deletions packages/message-parser/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ export const color = (r: number, g: number, b: number, a = 255): Color => ({
value: { r, g, b, a },
});

export const emoji = (() => {
const fn = generate('EMOJI');
return (value: string) => fn(plain(value));
})();

export const heading = (
value: Heading['value'],
level: Heading['level'] = 1
Expand Down Expand Up @@ -89,6 +84,11 @@ export const mentionUser = (() => {
return (value: string) => fn(plain(value));
})();

export const emoji = (() => {
const fn = generate('EMOJI');
return (value: string) => fn(plain(value));
})();

export const reducePlainTexts = (
values: Paragraph['value']
): Paragraph['value'] =>
Expand Down

0 comments on commit cc0d498

Please sign in to comment.