Skip to content
Merged
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
1 change: 1 addition & 0 deletions oxlint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default defineConfig({
'vitest/prefer-each': 'error',
'vitest/prefer-equality-matcher': 'error',
'vitest/prefer-expect-resolves': 'error',
'vitest/prefer-expect-type-of': 'error',
'vitest/prefer-hooks-in-order': 'error',
'vitest/prefer-hooks-on-top': 'error',
'vitest/prefer-import-in-mock': 'error',
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-bundler-core/src/virtual-console.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ describe('virtual-console', () => {
name: 'Error',
message: 'boom',
})
expect(typeof body.entries[0].args[2].stack).toBe('string')
expect(body.entries[0].args[2].stack).toBeTypeOf('string')
} finally {
restore()
}
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-rspack/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { defineDevtoolsConfig, devtools } from './index'
describe('devtools-rspack entry', () => {
it('devtools() returns a plugin with an apply method', () => {
const plugin = devtools({ logging: false })
expect(typeof (plugin as any).apply).toBe('function')
expect((plugin as any).apply).toBeTypeOf('function')
})
it('defineDevtoolsConfig is identity', () => {
const cfg = { logging: false }
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-rspack/src/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('TanStackDevtoolsRspackPlugin', () => {
it('wraps devServer.setupMiddlewares in development', () => {
const c = mockCompiler('development')
new TanStackDevtoolsRspackPlugin().apply(c as any)
expect(typeof c.options.devServer.setupMiddlewares).toBe('function')
expect(c.options.devServer.setupMiddlewares).toBeTypeOf('function')
})

it('does not wrap setupMiddlewares in production', () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/devtools-utils/src/svelte/panel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ describe('createSveltePanel', () => {
it('returns a [Panel, NoOpPanel] tuple of component functions', () => {
const { Core } = makeCoreClass()
const [Panel, NoOpPanel] = createSveltePanel(Core as any)
expect(typeof Panel).toBe('function')
expect(typeof NoOpPanel).toBe('function')
expect(Panel).toBeTypeOf('function')
expect(NoOpPanel).toBeTypeOf('function')
})

describe('Panel', () => {
Expand Down
6 changes: 3 additions & 3 deletions packages/devtools-utils/src/svelte/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ describe('createSveltePlugin', () => {
const result = createSveltePlugin(pluginConfig)
expect(result).toHaveLength(2)
const [Plugin, NoOpPlugin] = result
expect(typeof Plugin).toBe('function')
expect(typeof NoOpPlugin).toBe('function')
expect(Plugin).toBeTypeOf('function')
expect(NoOpPlugin).toBeTypeOf('function')
})

describe('Plugin()', () => {
Expand Down Expand Up @@ -53,7 +53,7 @@ describe('createSveltePlugin', () => {
expect(noop.id).toBe('my-plugin')
expect(noop.defaultOpen).toBe(true)
expect(noop.component).not.toBe(FakeComponent)
expect(typeof noop.component).toBe('function')
expect(noop.component).toBeTypeOf('function')
expect(noop.props).toStrictEqual({ foo: 'bar' })
})
})
Expand Down
2 changes: 1 addition & 1 deletion packages/event-bus/src/utils/json.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('json utils', () => {
const json = JSON.stringify({ id: { __type: 'bigint', value: '123' } })
const result = parseWithBigInt(json)
expect(result.id).toBe(BigInt(123))
expect(typeof result.id).toBe('bigint')
expect(result.id).toBeTypeOf('bigint')
})

it('should handle nested BigInt restoration', () => {
Expand Down
Loading