Skip to content

Commit 33d8290

Browse files
fix: Fix ESLint warnings (#5510)
1 parent 3210f6b commit 33d8290

File tree

5 files changed

+13
-15
lines changed

5 files changed

+13
-15
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const config = {
4747
'@typescript-eslint/no-non-null-assertion': 'off',
4848
'@typescript-eslint/no-unnecessary-condition': 'error',
4949
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
50+
'@typescript-eslint/no-unused-vars': 'off',
5051
'@typescript-eslint/no-inferrable-types': [
5152
'error',
5253
{ ignoreParameters: true },

packages/query-devtools/src/Explorer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { displayValue } from './utils'
2-
import superjson from 'superjson'
2+
import * as superjson from 'superjson'
33
import { css, cx } from '@emotion/css'
44
import { tokens } from './theme'
55
import { createMemo, createSignal, Index, Match, Show, Switch } from 'solid-js'

packages/query-devtools/src/utils.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Query } from '@tanstack/query-core'
2-
import SuperJSON from 'superjson'
2+
import * as superjson from 'superjson'
33

44
export function getQueryStatusLabel(query: Query) {
55
return query.state.fetchStatus === 'fetching'
@@ -60,7 +60,7 @@ export function getQueryStatusColorByLabel(label: IQueryStatusLabel) {
6060
* @param {boolean} beautify Formats json to multiline
6161
*/
6262
export const displayValue = (value: unknown, beautify: boolean = false) => {
63-
const { json } = SuperJSON.serialize(value)
63+
const { json } = superjson.serialize(value)
6464

6565
return JSON.stringify(json, null, beautify ? 2 : undefined)
6666
}

packages/react-query/src/__tests__/ssr-hydration.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react'
22
import ReactDOM from 'react-dom'
3-
import ReactDOMTestUtils from 'react-dom/test-utils'
4-
import ReactDOMServer from 'react-dom/server'
3+
import * as ReactDOMTestUtils from 'react-dom/test-utils'
4+
import * as ReactDOMServer from 'react-dom/server'
55
// eslint-disable-next-line import/no-unresolved -- types only for module augmentation
66
import type {} from 'react-dom/next'
77
import { vi } from 'vitest'

scripts/publish.mjs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -167,17 +167,14 @@ async function run() {
167167
/** Uses packages and changedFiles to determine which packages have changed */
168168
const changedPackages = RELEASE_ALL
169169
? packages
170-
: changedFiles.reduce((acc, file) => {
171-
const pkg = packages.find(
172-
(p) =>
173-
file.startsWith(path.join(p.packageDir, 'src')) ||
174-
file.startsWith(path.join(p.packageDir, 'package.json')),
170+
: packages.filter((pkg) => {
171+
const changed = changedFiles.some(
172+
(file) =>
173+
file.startsWith(path.join(pkg.packageDir, 'src')) ||
174+
file.startsWith(path.join(pkg.packageDir, 'package.json')),
175175
)
176-
if (pkg && !acc.find((d) => d.name === pkg.name)) {
177-
acc.push(pkg)
178-
}
179-
return acc
180-
}, /** @type {import('./types').Package[]} */ ([]))
176+
return changed
177+
})
181178

182179
// If a package has a dependency that has been updated, we need to update the
183180
// package that depends on it as well.

0 commit comments

Comments
 (0)