Add prettier as devDependency to improve development workflow

This commit is contained in:
Tw93
2025-08-16 22:44:31 +08:00
parent 6f9450d598
commit 29b7504109
9 changed files with 152 additions and 657 deletions

10
bin/options/index.ts vendored
View File

@@ -43,13 +43,11 @@ export default async function handleOptions(
}
if (!isValidName(name, platform)) {
const LINUX_NAME_ERROR = `✕ Name should only include lowercase letters, numbers, and dashes (not leading dashes). Examples: com-123-xxx, 123pan, pan123, weread, we-read, 123.`;
const DEFAULT_NAME_ERROR = `✕ Name should only include letters, numbers, dashes, and spaces (not leading dashes and spaces). Examples: 123pan, 123Pan, Pan123, weread, WeRead, WERead, we-read, We Read, 123.`;
const errorMsg =
platform === 'linux'
? `✕ Name should only include letters, numbers, dashes, and spaces. Spaces will be converted to dashes. Examples: Google Translate → google-translate, 123pan, weread.`
: `✕ Name should only include letters, numbers, dashes, and spaces (not leading dashes and spaces). Examples: Google Translate, 123pan, WeRead, we-read.`;
platform === 'linux' ? LINUX_NAME_ERROR : DEFAULT_NAME_ERROR;
logger.error(errorMsg);
if (isActions) {
name = resolveAppName(url, platform);
logger.warn(`✼ Inside github actions, use the default name: ${name}`);
@@ -64,7 +62,7 @@ export default async function handleOptions(
identifier: getIdentifier(url),
};
appOptions.icon = await handleIcon(appOptions, url);
appOptions.icon = await handleIcon(appOptions);
return appOptions;
}