Skip to content

Commit baf935f

Browse files
committed
fix: lint errors
1 parent b1cbd07 commit baf935f

7 files changed

Lines changed: 11 additions & 7 deletions

File tree

lib/Map/Leaflet/LeafletDataSourceDisplay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ export default class LeafletDataSourceDisplay {
289289
const tmp = new BoundingSphere();
290290

291291
let count = 0;
292-
let state = BoundingSphereState.DONE;
292+
let state: BoundingSphereState;
293293
const visualizers = dataSource.visualizers;
294294
const visualizersLength = visualizers.length;
295295

lib/Map/Vector/Protomaps/mapboxStyleJsonToProtomaps.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ export function getFont(obj: any, fontSubMap: Record<string, FontSub>) {
171171
}
172172
if (text_size.stops) {
173173
let base = 1.4;
174+
// eslint-disable-next-line no-useless-assignment
174175
if (text_size.base) base = text_size.base;
175176
else text_size.base = base;
176177
const t = numberFn(text_size);

lib/Models/ItemSearchProviders/IndexedItemSearchProvider.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ export default class IndexedItemSearchProvider extends ItemSearchProvider {
109109
} catch (parseError) {
110110
console.warn(parseError);
111111
throw new Error(
112-
t("indexedItemSearchProvider.errorParsingIndexRoot", { indexRootUrl })
112+
t("indexedItemSearchProvider.errorParsingIndexRoot", { indexRootUrl }),
113+
{ cause: parseError }
113114
);
114115
}
115116
}

lib/ReactViews/Clipboard.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const Clipboard: FC<ClipboardProps> = (props) => {
3434

3535
useEffect(() => {
3636
if (createdMessage && !prevTextRef.current && text) {
37+
// eslint-disable-next-line react-hooks/set-state-in-effect
3738
setShowCreatedMessage(true);
3839
}
3940
prevTextRef.current = text;

lib/ReactViews/Map/MapNavigation/MapNavigation.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ class MapNavigationBase extends Component<PropTypes> {
181181
.reverse();
182182

183183
// Ensure we are not showing more composites than we have height for
184-
let overflows = false;
185184
let maxVisible = itemsToShow.length;
186185
let size = 0;
187186
if (this.overflows) {
@@ -209,7 +208,7 @@ class MapNavigationBase extends Component<PropTypes> {
209208
//there is nothing else we can do, we have to show the rest of items as it is.
210209
return;
211210
}
212-
overflows = itemsToShow.length > maxVisible;
211+
const overflows = itemsToShow.length > maxVisible;
213212
const itemsToCollapseId: string[] = [];
214213
const activeCollapsible: string[] = [];
215214
if (overflows) {
@@ -218,7 +217,6 @@ class MapNavigationBase extends Component<PropTypes> {
218217
size += OVERFLOW_ACTION_SIZE;
219218
this.overflows = true;
220219
}
221-
maxVisible = maxVisible - pinnedItems.length;
222220
// first try to collapse inactive items and then active ones if needed
223221
for (let i = 0; i < possibleToCollapse.length; i++) {
224222
const item = possibleToCollapse[i];

lib/ReactViews/Map/Panels/SharePanel/SharePanelContent.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ export const SharePanelContent: FC<ISharePanelContentProps> = ({
4646
});
4747
}, [terria]);
4848

49+
// eslint-disable-next-line react-hooks/refs
50+
const shareUrl = shareUrlRef?.current;
51+
4952
return (
5053
<Box paddedRatio={3} column>
5154
<Text semiBold medium>
@@ -89,7 +92,7 @@ export const SharePanelContent: FC<ISharePanelContentProps> = ({
8992
<Spacing bottom={4} />
9093
<PrintSection viewState={viewState} />
9194
<Spacing bottom={4} />
92-
<EmbedSection shareUrl={shareUrlRef?.current} />
95+
<EmbedSection shareUrl={shareUrl} />
9396
</Box>
9497
);
9598
};

lib/ReactViews/Tour/TourPortal.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import TourProgressDot from "./TourProgressDot.jsx";
4343
* Fill in indicator dot depending on progress determined from count & max count
4444
*/
4545
const TourProgress = ({ max, step, setTourIndex }) => {
46-
const countArray = Array.from(Array(max).keys()).map((e) => e++);
46+
const countArray = Array.from(Array(max).keys()).map((e) => e + 1);
4747
const countStep = step;
4848
return (
4949
<Box centered>

0 commit comments

Comments
 (0)