Skip to content

Commit

Permalink
chore: update dependencies (#3054)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny authored May 18, 2024
1 parent a8a5697 commit 616e9bb
Show file tree
Hide file tree
Showing 7 changed files with 955 additions and 1,102 deletions.
2,041 changes: 945 additions & 1,096 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/component/1d/XAxis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function XAxis(props: XAxisProps) {
// @ts-expect-error This line of code is actually well typed ...
d3.select(refAxis.current).call(xAxis);

// @ts-expect-error ditto
// @ts-expect-error This line of code is actually well typed ...
d3.select(refGrid.current).call(grid);
}, [height, margin.bottom, margin.top, scaleX, show, xDomain]);

Expand Down
2 changes: 1 addition & 1 deletion src/component/hooks/useCheckPointsNumberInWindowArea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useChartData } from '../context/ChartContext';

import useSpectrum from './useSpectrum';

export const MIN_AREA_POINTS = 5 as const;
export const MIN_AREA_POINTS = 5;

export function useCheckPointsNumberInWindowArea() {
const state = useChartData();
Expand Down
8 changes: 5 additions & 3 deletions src/component/main/NMRiumStateProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,13 @@ export default function NMRiumStateProvider(props: NMRiumStateProviderProps) {
}
dispatch({ type: 'INITIATE', payload: { nmriumState } });
})
.catch((error) => {
.catch((error: unknown) => {
dispatch({ type: 'SET_LOADING_FLAG', payload: { isLoading: false } });

// eslint-disable-next-line no-alert
window.alert(error.message);
if (error instanceof Error) {
// eslint-disable-next-line no-alert
window.alert(error.message);
}
reportError(error);
});
}
Expand Down
1 change: 1 addition & 0 deletions src/component/utility/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ async function copyBlobToClipboard(canvas: HTMLCanvasElement) {
navigator.userAgent,
);
if (typeof ClipboardItem !== 'undefined') {
// eslint-disable-next-line @typescript-eslint/use-unknown-in-catch-callback-variable
await writeImageToClipboard(b, isSafari).catch(reportError);
} else {
const png = canvas.toDataURL('image/png', 1);
Expand Down
1 change: 1 addition & 0 deletions src/demo/views/Exercise.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export default function Exercise(props) {
setData(_d);
}
})
// eslint-disable-next-line @typescript-eslint/use-unknown-in-catch-callback-variable
.catch(reportError);

return () => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/clipboard/clipboardHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function useNavigatorPermission(
setState(status.state);
status.addEventListener('change', onPermissionChange);
})
.catch((error) => {
.catch((error: unknown) => {
if (canceled) return;

onError(error);
Expand Down

0 comments on commit 616e9bb

Please sign in to comment.