Skip to content

Commit 8f9c0e8

Browse files
author
Daniel Del Core
committed
add additional package.json checks to validate script
1 parent efe8cf4 commit 8f9c0e8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/validate.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ If this is a scoped package, please make sure rename the folder to use the "__"
2020
For example: @codeshift/mod-foo__bar`);
2121
}
2222

23+
if (pkgJson.name === 'dist/codeshift.config.js') {
24+
throw new Error(`Invalid package entry point for package: ${pkgJson.name} in: ${pkgJsonPath}.
25+
'main' should always point to 'dist/codeshift.config.js'`);
26+
}
27+
2328
return true;
2429
}
2530

0 commit comments

Comments
 (0)