Skip to content

Commit

Permalink
fix(@schematics/angular): mark project as required option
Browse files Browse the repository at this point in the history
While this option is always required it was not marked as such

Closes #23848
  • Loading branch information
alan-agius4 authored and clydin committed Sep 2, 2022
1 parent 130975c commit 57d93fb
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/schematics/angular/class/schema.json
Expand Up @@ -42,5 +42,5 @@
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\"."
}
},
"required": ["name"]
"required": ["name", "project"]
}
2 changes: 1 addition & 1 deletion packages/schematics/angular/component/schema.json
Expand Up @@ -136,5 +136,5 @@
"x-user-analytics": 19
}
},
"required": ["name"]
"required": ["name", "project"]
}
2 changes: 1 addition & 1 deletion packages/schematics/angular/directive/schema.json
Expand Up @@ -85,5 +85,5 @@
"x-user-analytics": 19
}
},
"required": ["name"]
"required": ["name", "project"]
}
2 changes: 1 addition & 1 deletion packages/schematics/angular/enum/schema.json
Expand Up @@ -36,5 +36,5 @@
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\"."
}
},
"required": ["name"]
"required": ["name", "project"]
}
2 changes: 1 addition & 1 deletion packages/schematics/angular/guard/schema.json
Expand Up @@ -55,5 +55,5 @@
"x-prompt": "Which interfaces would you like to implement?"
}
},
"required": ["name"]
"required": ["name", "project"]
}
2 changes: 1 addition & 1 deletion packages/schematics/angular/interceptor/schema.json
Expand Up @@ -43,5 +43,5 @@
"x-user-analytics": 12
}
},
"required": ["name"]
"required": ["name", "project"]
}
2 changes: 1 addition & 1 deletion packages/schematics/angular/interface/schema.json
Expand Up @@ -44,5 +44,5 @@
}
}
},
"required": ["name"]
"required": ["name", "project"]
}
2 changes: 1 addition & 1 deletion packages/schematics/angular/module/schema.json
Expand Up @@ -64,5 +64,5 @@
"alias": "m"
}
},
"required": ["name"]
"required": ["name", "project"]
}
2 changes: 1 addition & 1 deletion packages/schematics/angular/pipe/schema.json
Expand Up @@ -66,5 +66,5 @@
"x-user-analytics": 19
}
},
"required": ["name"]
"required": ["name", "project"]
}
2 changes: 1 addition & 1 deletion packages/schematics/angular/resolver/schema.json
Expand Up @@ -43,5 +43,5 @@
}
}
},
"required": ["name"]
"required": ["name", "project"]
}
2 changes: 1 addition & 1 deletion packages/schematics/angular/service/schema.json
Expand Up @@ -42,5 +42,5 @@
"x-user-analytics": 12
}
},
"required": ["name"]
"required": ["name", "project"]
}
4 changes: 2 additions & 2 deletions packages/schematics/angular/utility/generate-from-files.ts
Expand Up @@ -28,7 +28,7 @@ export interface GenerateFromFilesOptions {
name: string;
path?: string;
prefix?: string;
project?: string;
project: string;
skipTests?: boolean;
}

Expand All @@ -37,7 +37,7 @@ export function generateFromFiles(
extraTemplateValues: Record<string, string | ((v: string) => string)> = {},
): Rule {
return async (host: Tree) => {
options.path ??= await createDefaultPath(host, options.project as string);
options.path ??= await createDefaultPath(host, options.project);
options.prefix ??= '';
options.flat ??= true;

Expand Down

0 comments on commit 57d93fb

Please sign in to comment.