Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# eslint-plugin-import, eslint-plugin-react, eslint-plugin-jsx-a11y, and
# eslint-plugin-jest-dom declare peer dependencies up to eslint@^9 but work
# correctly with ESLint 10 via @eslint/compat fixupPluginRules().
# Remove this once those plugins publish ESLint 10-compatible releases.
legacy-peer-deps=true
13 changes: 9 additions & 4 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import js from '@eslint/js';
import globals from 'globals';
import { fixupPluginRules } from '@eslint/compat';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
Expand Down Expand Up @@ -46,10 +47,14 @@ export default [
},

plugins: {
import: importPlugin,
'jest-dom': jestDomPlugin,
'jsx-a11y': jsxA11yPlugin,
react: reactPlugin,
// eslint-plugin-import, react, jsx-a11y, and jest-dom still declare ESLint
// peer deps up to ^9; wrap them with fixupPluginRules so their internal use
// of removed context APIs (e.g. getFilename, getSourceCode) keeps working.
import: fixupPluginRules(importPlugin),
'jest-dom': fixupPluginRules(jestDomPlugin),
'jsx-a11y': fixupPluginRules(jsxA11yPlugin),
react: fixupPluginRules(reactPlugin),
// react-hooks and testing-library already declare ESLint 10 support
'react-hooks': reactHooksPlugin,
'testing-library': testingLibraryPlugin,
},
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@eslint/compat": "^2.0.3",
"@eslint/eslintrc": "^3.3.5",
"@eslint/js": "^9.39.4",
"@eslint/js": "^10.0.0",
"@mui/material": "^7.x",
"@mui/system": "^7.x",
"@testing-library/dom": "^10.4.0",
Expand All @@ -96,15 +95,15 @@
"@vitest/ui": "^4.1.2",
"bundlewatch": "^0.4.0",
"chalk": "^5.3.0",
"eslint": "^9.39.4",
"eslint": "^10.0.0",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-jest-dom": "^5.5.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-testing-library": "^7.16.2",
"glob": "^13.0.6",
"globals": "^15.15.0",
"globals": "^16.0.0",
"happy-dom": "^20.0",
"react": "^19.0.0",
"react-dnd-test-backend": "^16.0.1",
Expand Down
3 changes: 1 addition & 2 deletions src/components/AnnotationsOverlay.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,8 @@ export function AnnotationsOverlay({
};
};

let annosWithScore = [];
let radius = 1;
annosWithScore = sortBy(annos.map(annosWithClickScore(radius)), 'score');
let annosWithScore = sortBy(annos.map(annosWithClickScore(radius)), 'score');

while (radius < Math.max(canvasWidth, canvasHeight)
&& annosWithScore[0].score === annosWithScore[1].score) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/ViewerNavigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export function ViewerNavigation({
}) {
const { t } = useTranslation();
let htmlDir = 'ltr';
let previousIconStyle = {};
let nextIconStyle = {};
let previousIconStyle;
let nextIconStyle;
switch (viewingDirection) {
case 'top-to-bottom':
previousIconStyle = { transform: 'rotate(270deg)' };
Expand Down
2 changes: 1 addition & 1 deletion src/components/WindowTopBarTitle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TitleTypography.propTypes = {
export function WindowTopBarTitle({
error = null, hideWindowTitle = false, isFetching = false, manifestTitle = '',
}) {
let title = null;
let title;
if (isFetching) {
title = (
<StyledTitleTypography>
Expand Down
Loading