Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 356 Bytes

no-mocks-import.md

File metadata and controls

21 lines (13 loc) · 356 Bytes

Disallow importing from mocks directory (vitest/no-mocks-import)

⚠️ This rule warns in the 🌐 all config.

Rule Details

This rule aims to prevent importing from the __mocks__ directory.

Fail

import { foo } from '__mocks__/foo'

Pass

import { foo } from 'foo'