Skip to content

Commit b58583d

Browse files
committed
Fix linting errors
1 parent c468c76 commit b58583d

File tree

40 files changed

+258
-189
lines changed

40 files changed

+258
-189
lines changed

browser/create-template/src/createOutputFolder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function createOutputFolder(outputDir: string): Promise<void> {
1717

1818
try {
1919
fs.mkdirSync(outputDir);
20-
} catch (error) {
20+
} catch (e) {
2121
console.error(`Failed to create directory: ${outputDir}`);
2222
process.exit(1);
2323
}

browser/create-template/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env node
2-
/* eslint-disable no-console */
32
import path from 'node:path';
43
import { parseArgs } from 'node:util';
54
import { copyTemplate } from './copyTemplate.js';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/src/locales/**

browser/data-browser/src/chunks/CodeEditor/AsyncJSONEditor.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const AsyncJSONEditor: React.FC<JSONEditorProps> = ({
5656
);
5757

5858
// Wrap jsonParseLinter so we can tap into diagnostics
59-
const validationLinter = useCallback(() => {
59+
const validationLinter = useMemo(() => {
6060
const delegate = jsonParseLinter();
6161

6262
return (view: EditorView) => {
@@ -85,8 +85,7 @@ const AsyncJSONEditor: React.FC<JSONEditorProps> = ({
8585
}, [onValidationChange, required]);
8686

8787
const extensions = useMemo(
88-
// eslint-disable-next-line react-hooks/react-compiler
89-
() => [json(), linter(validationLinter())],
88+
() => [json(), linter(validationLinter)],
9089
[validationLinter],
9190
);
9291

browser/data-browser/src/chunks/CurrencyPicker/CurrencyPicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const CurrencyPicker: FC<CurrencyPickerProps> = ({ resource }) => {
3535
}
3636

3737
// We only want to run this effect once. Maybe we should find a better way to do this.
38-
// eslint-disable-next-line react-hooks/react-compiler, react-hooks/exhaustive-deps
38+
// eslint-disable-next-line react-hooks/exhaustive-deps
3939
}, []);
4040

4141
return (

browser/data-browser/src/chunks/RTE/ResourceExtension/ResourceNode.module.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
&:has(.wideNode) {
1010
width: 1100px;
11-
margin-left: -150px;
11+
margin-left: -150px;
1212

13-
@container (max-width: 1100px) {
14-
width: 100%;
15-
margin-left: 0;
16-
}
13+
@container (max-width: 1100px) {
14+
width: 100%;
15+
margin-left: 0;
16+
}
1717
}
1818
}

browser/data-browser/src/components/Button.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ const getButtonComp = ({ clean, icon, subtle, alert }: ButtonProps) => {
4343
}
4444

4545
if (clean) {
46-
// @ts-ignore
4746
Comp = ButtonClean;
4847
}
4948

@@ -131,7 +130,6 @@ interface ButtonBarProps {
131130
}
132131

133132
/** Button inside the navigation bar */
134-
// eslint-disable-next-line prettier/prettier
135133
export const ButtonBar = styled(ButtonClean)<ButtonBarProps>`
136134
padding-right: 0.5rem;
137135
padding-left: 0.5rem;
@@ -157,7 +155,6 @@ export const ButtonBar = styled(ButtonClean)<ButtonBarProps>`
157155
`;
158156

159157
/** Button with some optional margins around it */
160-
// eslint-disable-next-line prettier/prettier
161158
export const ButtonDefault = styled(ButtonBase)<ButtonPropsStyled>`
162159
--button-bg-color: ${p => p.theme.colors.main};
163160
--button-bg-color-hover: ${p => p.theme.colors.mainLight};

browser/data-browser/src/components/Dialog/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,13 @@ const InnerDialog: React.FC<React.PropsWithChildren<InternalDialogProps>> = ({
139139

140140
if (show) {
141141
if (!dialogRef.current.hasAttribute('open'))
142-
// @ts-ignore
143142
dialogRef.current.showModal();
144143
}
145144

146145
if (dialogRef.current.hasAttribute('data-closing')) {
147146
// TODO: Use getAnimations() api to wait for the animations to complete instead of a timeout.
148147
return timeoutEffect(() => {
149-
// @ts-ignore
150-
dialogRef.current.close();
148+
dialogRef.current?.close();
151149
dialogRef.current?.removeAttribute('data-closing');
152150
onClosed();
153151
}, ANIM_MS);

browser/data-browser/src/components/HotKeyWrapper.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ function HotKeysWrapper({ children }: Props): JSX.Element {
7474
shortcuts.edit,
7575
e => {
7676
e.preventDefault();
77-
Client.isValidSubject(subject) && navigate(editURL(subject!));
77+
78+
if (Client.isValidSubject(subject)) {
79+
navigate(editURL(subject!));
80+
}
7881
},
7982
{},
8083
[subject],
@@ -83,7 +86,10 @@ function HotKeysWrapper({ children }: Props): JSX.Element {
8386
shortcuts.data,
8487
e => {
8588
e.preventDefault();
86-
Client.isValidSubject(subject) && navigate(dataURL(subject!));
89+
90+
if (Client.isValidSubject(subject)) {
91+
navigate(dataURL(subject!));
92+
}
8793
},
8894
{},
8995
[subject],

browser/data-browser/src/components/Navigation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function NavBar(): JSX.Element {
8787
const isInStandaloneMode = React.useMemo<boolean>(
8888
() =>
8989
machesStandalone ||
90-
//@ts-ignore
90+
// @ts-expect-error standalone is available on the navigator object.
9191
window.navigator.standalone ||
9292
document.referrer.includes('android-app://') ||
9393
isRunningInTauri(),

0 commit comments

Comments
 (0)