Skip to content

Commit 1ebc2d1

Browse files
committed
chore: fix meteor linter errors
1 parent 7e5e899 commit 1ebc2d1

File tree

56 files changed

+156
-155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+156
-155
lines changed

packages/webui/src/__mocks__/_setupMocks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-require-imports */
12
import { resetRandomId } from './random.js'
23

34
// This file is run before all tests start.

packages/webui/src/__mocks__/helpers/jest.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable jest/no-export, jest/valid-title, jest/expect-expect, jest/no-focused-tests */
2-
31
const orgSetTimeout = setTimeout
42
const DateOrg = Date
53
export async function runAllTimers(): Promise<void> {
@@ -43,7 +41,6 @@ export async function waitUntil(expectFcn: () => void | Promise<void>, maxWaitTi
4341
const iterateInterval = maxWaitTime < 100 ? 10 : 100
4442

4543
const startTime = Date.now()
46-
// eslint-disable-next-line no-constant-condition
4744
while (true) {
4845
await waitTime(iterateInterval)
4946
try {

packages/webui/src/__mocks__/meteor.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-unsafe-function-type */
12
import * as _ from 'underscore'
23
import type { DDP } from 'meteor/ddp'
34

packages/webui/src/__mocks__/tracker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export namespace TrackerMock {
116116

117117
TrackerMock.currentComputation.onInvalidate(clb)
118118
}
119-
export function afterFlush(_clb: Function): void {
119+
export function afterFlush(_clb: () => void): void {
120120
throw new Error(`Tracker.afterFlush() is not implemented in the mock Tracker`)
121121
}
122122
}

packages/webui/src/client/__tests__/jest-setup.cjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable n/no-unpublished-require */
21
require('@testing-library/jest-dom')
32

43
// used by code creating XML with the DOM API to return an XML string

packages/webui/src/client/lib/Components/JsonTextInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export function tryParseJson(str: string | undefined): { parsed: object } | unde
1010
try {
1111
const parsed = JSON.parse(str2)
1212
if (typeof parsed === 'object') return { parsed: parsed }
13-
} catch (err) {
13+
} catch (_err) {
1414
// ignore
1515
}
1616
return undefined

packages/webui/src/client/lib/Components/MultiSelectInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function MultiSelectInputControl({
4040
currentOptionMissing = true
4141
}
4242
}
43-
} catch (e) {
43+
} catch (_e) {
4444
// `value` is probably invalid. We can't do much
4545
}
4646

packages/webui/src/client/lib/ConnectionStatusNotification.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class ConnectionStatusNotifier extends WithManagedTracker {
5353
lastNotificationId = undefined
5454
try {
5555
NotificationCenter.drop(buf)
56-
} catch (e) {
56+
} catch (_e) {
5757
// if the last notification can't be dropped, ignore
5858
}
5959
}

packages/webui/src/client/lib/EditAttribute.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ function useEditAttributeStateHelper(props: IEditAttributeBaseProps): EditAttrib
405405
try {
406406
newValue = props.mutateUpdateValue(newValue)
407407
setValueError(false)
408-
} catch (e) {
408+
} catch (_e) {
409409
setValueError(true)
410410

411411
return

packages/webui/src/client/lib/ReactMeteorData/ReactMeteorData.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable react/prefer-stateless-function */
2-
31
import React, { useState, useEffect, useRef, useCallback } from 'react'
42
import { Meteor } from 'meteor/meteor'
53
import { Mongo } from 'meteor/mongo'
@@ -10,7 +8,7 @@ import { meteorSubscribe } from '../meteorApi.js'
108
import { stringifyObjects } from '../tempLib.js'
119
import _ from 'underscore'
1210

13-
const globalTrackerQueue: Array<Function> = []
11+
const globalTrackerQueue: Array<() => void> = []
1412
let globalTrackerTimestamp: number | undefined = undefined
1513
let globalTrackerTimeout: number | undefined = undefined
1614

@@ -91,7 +89,7 @@ class MeteorDataManager {
9189
globalTrackerQueue.length = 0
9290
}
9391

94-
static enqueueUpdate(func: Function) {
92+
static enqueueUpdate(func: () => void) {
9593
if (globalTrackerTimeout !== undefined) {
9694
clearTimeout(globalTrackerTimeout)
9795
globalTrackerTimeout = undefined
@@ -310,7 +308,6 @@ export function translateWithTracker<IProps, IState, TrackedProps>(
310308
checkUpdate?: (data: any, props: IProps, nextProps: IProps, state?: IState, nextState?: IState) => boolean,
311309
queueTrackerUpdates?: boolean
312310
): (component: React.ComponentType<Translated<IProps & TrackedProps>>) => React.ComponentType<IProps> {
313-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
314311
return (WrappedComponent) => {
315312
const inner: React.ComponentType<Translated<IProps>> = withTracker<Translated<IProps>, IState, TrackedProps>(
316313
autorunFunction,

0 commit comments

Comments
 (0)