Skip to content

Commit cc0d498

Browse files
authored
fix(eslint): Add missing ESLint rule for TypeScript (#470)
1 parent e393d98 commit cc0d498

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

packages/eslint-config-alt/typescript/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module.exports = {
1818
argsIgnorePattern: '^_',
1919
},
2020
],
21+
'@typescript-eslint/no-use-before-define': ['error'],
2122
'func-call-spacing': 'off',
2223
'indent': 'off',
2324
'import/order': [

packages/fuselage/src/components/Message/Metrics/index.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ const ContentItem: FC = (props) => (
1111
<div className='rcx-message-metrics__content-item' {...props} />
1212
);
1313

14-
export const Reply: FC<ComponentProps<typeof Button>> = (props) => (
15-
<MetricsItem>
16-
<Button {...props} {...{ small: true, primary: true }} />
17-
</MetricsItem>
18-
);
19-
2014
type IconProps = { name: 'thread' | 'user' | 'clock' | 'discussion' };
2115
type FollowingProps = { name: 'bell' | 'bell-off' };
2216

@@ -47,6 +41,12 @@ const MetricsFollowing: FC<FollowingProps> = ({ name }) => (
4741
/>
4842
);
4943

44+
export const Reply: FC<ComponentProps<typeof Button>> = (props) => (
45+
<MetricsItem>
46+
<Button {...props} {...{ small: true, primary: true }} />
47+
</MetricsItem>
48+
);
49+
5050
Metrics.Reply = Reply;
5151

5252
Metrics.Item = MetricsItem;

packages/message-parser/src/utils.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ export const color = (r: number, g: number, b: number, a = 255): Color => ({
2222
value: { r, g, b, a },
2323
});
2424

25-
export const emoji = (() => {
26-
const fn = generate('EMOJI');
27-
return (value: string) => fn(plain(value));
28-
})();
29-
3025
export const heading = (
3126
value: Heading['value'],
3227
level: Heading['level'] = 1
@@ -89,6 +84,11 @@ export const mentionUser = (() => {
8984
return (value: string) => fn(plain(value));
9085
})();
9186

87+
export const emoji = (() => {
88+
const fn = generate('EMOJI');
89+
return (value: string) => fn(plain(value));
90+
})();
91+
9292
export const reducePlainTexts = (
9393
values: Paragraph['value']
9494
): Paragraph['value'] =>

0 commit comments

Comments
 (0)