Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 950 Bytes

File metadata and controls

43 lines (28 loc) · 950 Bytes

vitest/no-importing-vitest-globals

📝 Disallow importing Vitest globals.

🚫 This rule is disabled in the 🌐 all config.

🔧 This rule is automatically fixable by the --fix CLI option.

⚠️ This rule warns in the 🌐 all config.

🔧 This rule is automatically fixable by the --fix CLI option.

Rule Details

This rule disallows importing Vitest globals.

Examples of incorrect code for this rule:

import { test, expect } from 'vitest'

test('foo', () => {
  expect(1).toBe(1)
})
const { test, expect } = require('vitest')

test('foo', () => {
  expect(1).toBe(1)
})

Examples of correct code for this rule:

test('foo', () => {
  expect(1).toBe(1)
})