fix(tools): adjust message short name to dashed name (#54184)

This commit is contained in:
Ilenia
2024-03-22 14:46:24 +01:00
committed by GitHub
parent aa34f377d6
commit 2e316d5d40
2 changed files with 4 additions and 4 deletions
@@ -198,10 +198,10 @@ void prompt([
},
{
name: 'block',
message: 'What is the short name (in kebab-case) for this project?',
message: 'What is the dashed name (in kebab-case) for this project?',
validate: (block: string) => {
if (!block.length) {
return 'please enter a short name';
return 'please enter a dashed name';
}
if (/[^a-z0-9-]/.test(block)) {
return 'please use alphanumerical characters and kebab case';
@@ -23,10 +23,10 @@ export const newChallengePrompts = async (): Promise<{
const dashedName = await prompt<{ value: string }>({
name: 'value',
message: 'What is the short name (in kebab-case) for this challenge?',
message: 'What is the dashed name (in kebab-case) for this challenge?',
validate: (block: string) => {
if (!block.length) {
return 'please enter a short name';
return 'please enter a dashed name';
}
if (/[^a-z0-9-]/.test(block)) {
return 'please use alphanumerical characters and kebab case';