Skip to content

Commit 0bc3683

Browse files
committed
style: 💄 fix linter issues
1 parent 973ec8e commit 0bc3683

File tree

8 files changed

+18
-39
lines changed

8 files changed

+18
-39
lines changed

src/json-crdt-peritext-ui/plugins/cursor/RenderCaret.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const RenderCaret: React.FC<RenderCaretProps> = ({italic, children}) => {
8888
}}
8989
/>
9090
)}
91-
91+
9292
{/* Two carets overlay, so that they look good, both, on white and black backgrounds. */}
9393
<span className={innerClass + innerClass2} style={style} />
9494
<span className={innerClass} style={style} />

src/json-crdt-peritext-ui/plugins/minimal/RenderInline/Spoiler.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from 'react';
1+
import type * as React from 'react';
22
import {rule} from 'nano-theme';
33

44
const blockClass = rule({
@@ -18,7 +18,5 @@ export interface SpoilerProps {
1818
export const Spoiler: React.FC<SpoilerProps> = (props) => {
1919
const {children} = props;
2020

21-
return (
22-
<span className={blockClass}>{children}</span>
23-
);
21+
return <span className={blockClass}>{children}</span>;
2422
};

src/json-crdt-peritext-ui/plugins/minimal/RenderInline/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from 'react';
1+
import type * as React from 'react';
22
import {usePeritext} from '../../../react';
33
import {useSyncStoreOpt} from '../../../react/hooks';
44
import {DefaultRendererColors} from '../constants';

src/json-crdt-peritext-ui/plugins/toolbar/RenderInline/Code.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import * as React from 'react';
1+
import type * as React from 'react';
22
import {rule, drule, theme, useTheme} from 'nano-theme';
3-
import {InlineAttr} from '../../../../json-crdt-extensions';
3+
import type {InlineAttr} from '../../../../json-crdt-extensions';
44

55
const blockClass = drule({
66
...theme.font.mono.mid,
@@ -31,12 +31,10 @@ export const Code: React.FC<CodeProps> = (props) => {
3131
const theme = useTheme();
3232
const className =
3333
blockClass({
34-
bg: theme.g(.2, .1),
34+
bg: theme.g(0.2, 0.1),
3535
}) +
3636
(attr.isStart() ? startClass : '') +
3737
(attr.isEnd() ? endClass : '');
3838

39-
return (
40-
<span className={className}>{children}</span>
41-
);
39+
return <span className={className}>{children}</span>;
4240
};

src/json-crdt-peritext-ui/plugins/toolbar/RenderInline/Del.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from 'react';
1+
import type * as React from 'react';
22
import {rule} from 'nano-theme';
33

44
const delClass = rule({
@@ -14,9 +14,5 @@ export interface DelProps {
1414
export const Del: React.FC<DelProps> = (props) => {
1515
const {children} = props;
1616

17-
return (
18-
<del className={delClass}>
19-
{children}
20-
</del>
21-
);
17+
return <del className={delClass}>{children}</del>;
2218
};

src/json-crdt-peritext-ui/plugins/toolbar/RenderInline/Ins.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from 'react';
1+
import type * as React from 'react';
22
import {rule} from 'nano-theme';
33

44
const blockClass = rule({
@@ -14,9 +14,5 @@ export interface InsProps {
1414
export const Ins: React.FC<InsProps> = (props) => {
1515
const {children} = props;
1616

17-
return (
18-
<ins className={blockClass}>
19-
{children}
20-
</ins>
21-
);
17+
return <ins className={blockClass}>{children}</ins>;
2218
};

src/json-crdt-peritext-ui/plugins/toolbar/RenderInline/Kbd.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import * as React from 'react';
1+
import type * as React from 'react';
22
import {rule, theme} from 'nano-theme';
3-
import {InlineAttr} from '../../../../json-crdt-extensions';
3+
import type {InlineAttr} from '../../../../json-crdt-extensions';
44

55
const blockClass = rule({
66
...theme.font.mono.mid,
@@ -37,14 +37,7 @@ export interface KbdProps {
3737

3838
export const Kbd: React.FC<KbdProps> = (props) => {
3939
const {attr, children} = props;
40-
const className =
41-
blockClass +
42-
(attr.isStart() ? startClass : '') +
43-
(attr.isEnd() ? endClass : '');
40+
const className = blockClass + (attr.isStart() ? startClass : '') + (attr.isEnd() ? endClass : '');
4441

45-
return (
46-
<kbd className={className}>
47-
{children}
48-
</kbd>
49-
);
42+
return <kbd className={className}>{children}</kbd>;
5043
};

src/json-crdt-peritext-ui/plugins/toolbar/RenderInline/Spoiler.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from 'react';
1+
import type * as React from 'react';
22
import {rule} from 'nano-theme';
33

44
const blockClass = rule({
@@ -18,7 +18,5 @@ export interface SpoilerProps {
1818
export const Spoiler: React.FC<SpoilerProps> = (props) => {
1919
const {children} = props;
2020

21-
return (
22-
<span className={blockClass}>{children}</span>
23-
);
21+
return <span className={blockClass}>{children}</span>;
2422
};

0 commit comments

Comments
 (0)