Fix zod imports with ast-grep namespace import rule
Applied ast-grep rule to convert named zod imports to namespace imports across the api-contract package for consistency. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
13
.ast-grep/rule-tests/zod-namespace-import-test.yml
Normal file
13
.ast-grep/rule-tests/zod-namespace-import-test.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
id: zod-namespace-import
|
||||
valid:
|
||||
- |
|
||||
import * as z from "zod";
|
||||
- |
|
||||
import * as z from "zod";
|
||||
const schema = z.object({ name: z.string() });
|
||||
|
||||
invalid:
|
||||
- |
|
||||
import { z } from "zod";
|
||||
- |
|
||||
import { z, ZodError } from "zod";
|
||||
Reference in New Issue
Block a user