File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ export default {
2222 create ( context ) {
2323 const currentFilePath = path . resolve ( context . getFilename ( ) ) ;
2424
25- // Only enforce rule in config.ts
26- if ( currentFilePath ! == configFilePath ) {
25+ // Only allow zod v4 import in config.ts
26+ if ( currentFilePath = == configFilePath ) {
2727 return { } ;
2828 }
2929
@@ -36,11 +36,9 @@ export default {
3636 return ;
3737 }
3838
39- // If importing from 'zod' or any 'zod/...' except 'zod/v4', only allow 'zod/v4' in config.ts
40- const isZodImport = importPath === "zod" || importPath . startsWith ( "zod/" ) ;
4139 const isZodV4Import = importPath === "zod/v4" ;
4240
43- if ( isZodImport && ! isZodV4Import ) {
41+ if ( isZodV4Import ) {
4442 context . report ( {
4543 node,
4644 messageId : "enforceZodV4" ,
You can’t perform that action at this time.
0 commit comments