File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -17,16 +17,16 @@ function hasValidTransforms(transforms?: Record<string, string>) {
1717 return Object . entries ( transforms ) . every ( ( [ key ] ) => semver . valid ( key ) ) ;
1818}
1919
20- function hasValidPresets ( presets ?: Record < string , string > ) {
20+ function hasValidPresets ( presets ?: Record < string , string > ) : boolean {
2121 if ( ! presets || ! Object . keys ( presets ) . length ) return false ;
2222
2323 return Object . entries ( presets ) . every ( ( [ key ] ) =>
2424 key . match ( / ^ [ 0 - 9 a - z A - Z \- ] + $ / ) ,
2525 ) ;
2626}
2727
28- export function isValidPackageName ( dir : string ) {
29- return dir . match ( / ^ ( @ [ a - z 0 - 9 - ~ ] [ a - z 0 - 9 - ._ ~ ] * _ _ ) ? [ a - z 0 - 9 - ~ ] [ a - z 0 - 9 - ._ ~ ] * $ / ) ;
28+ export function isValidPackageName ( dir : string ) : boolean {
29+ return ! ! dir . match ( / ^ ( @ [ a - z 0 - 9 - ~ ] [ a - z 0 - 9 - ._ ~ ] * _ _ ) ? [ a - z 0 - 9 - ~ ] [ a - z 0 - 9 - ._ ~ ] * $ / ) ;
3030}
3131
3232export function isValidConfig ( config : CodeshiftConfig ) {
@@ -69,4 +69,6 @@ export async function isValidPackageJson(path: string) {
6969 if ( ! packageJson . main ) {
7070 throw new Error ( 'No main entrypoint provided in package.json' ) ;
7171 }
72+
73+ return true ;
7274}
You can’t perform that action at this time.
0 commit comments