Skip to content

Commit 861c746

Browse files
committed
style(json-crdt-extensions): 💄 fix linter issues and run formatter
1 parent 902950e commit 861c746

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/json-crdt-extensions/peritext/transfer/__tests__/jsx.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ test('can create basic JSX elements', () => {
1313

1414
expect(jsx).toEqual([
1515
SliceTypeCon.div,
16-
{ data: { className: 'test' }, inline: false, stacking: 0 },
17-
[ SliceTypeCon.b, { inline: true, stacking: 2 }, 'Hello' ]
16+
{data: {className: 'test'}, inline: false, stacking: 0},
17+
[SliceTypeCon.b, {inline: true, stacking: 2}, 'Hello'],
1818
]);
1919
});
2020

src/json-crdt-extensions/peritext/transfer/jsx.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
import {PeritextMlElement, PeritextMlNode} from '../block/types';
1+
import type {PeritextMlElement, PeritextMlNode} from '../block/types';
22
import {CommonSliceType} from '../slice';
33
import {SliceStacking} from '../slice/constants';
44

5-
export const h = (tag: string, props: Record<string, unknown> | null, ...children: PeritextMlNode[]): PeritextMlElement => {
5+
export const h = (
6+
tag: string,
7+
props: Record<string, unknown> | null,
8+
...children: PeritextMlNode[]
9+
): PeritextMlElement => {
610
const attrs: PeritextMlElement[1] = {};
711
if (props) attrs.data = props;
8-
if (tag as any === h) return ['', null, ...children];
12+
if ((tag as any) === h) return ['', null, ...children];
913
const num = CommonSliceType[tag as any];
1014
if (typeof num === 'number') {
1115
const inline = num < 0;

0 commit comments

Comments
 (0)