Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update XO configurations #10859

Merged
merged 5 commits into from May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions .xo-config.json
Expand Up @@ -3,9 +3,6 @@
"space": 2,
"plugins": ["import"],
"rules": {
"n/no-unsupported-features": "off",
"n/no-unsupported-features/node-builtins": "off",
"n/file-extension-in-import": "off",
"sort-imports": [
"error",
{
Expand All @@ -29,7 +26,8 @@
"warnOnUnassignedImports": true,
"newlines-between": "never"
}
]
],
"no-console": ["error", {"allow": ["warn", "error"]}]
},
"overrides": [
{
Expand Down
11 changes: 6 additions & 5 deletions scripts/add-icon-data.js
Expand Up @@ -121,9 +121,10 @@ try {
: undefined,
};

console.log(
process.stdout.write(
'About to write the following to simple-icons.json:\n' +
JSON.stringify(answers, null, 4),
JSON.stringify(answers, null, 4) +
'\n',
);

if (
Expand All @@ -134,14 +135,14 @@ try {
iconsData.icons.push(answers);
iconsData.icons.sort((a, b) => collator.compare(a.title, b.title));
await writeIconsData(iconsData);
console.log(chalk.green('\nData written successfully.'));
process.stdout.write(chalk.green('\nData written successfully.\n'));
} else {
console.log(chalk.red('\nAborted.'));
process.stdout.write(chalk.red('\nAborted.\n'));
process.exit(1);
}
} catch (error) {
if (error instanceof ExitPromptError) {
console.log(chalk.red('\nAborted.'));
process.stdout.write(chalk.red('\nAborted.\n'));
process.exit(1);
}

Expand Down
4 changes: 3 additions & 1 deletion scripts/get-filename.js
Expand Up @@ -14,5 +14,7 @@ if (process.argv.length < 3) {
} else {
const brandName = process.argv[2];
const filename = titleToSlug(brandName);
console.log(`For '${brandName}' use the file 'icons/${filename}.svg'`);
process.stdout.write(
`For '${brandName}' use the file 'icons/${filename}.svg'\n`,
);
}
10 changes: 6 additions & 4 deletions scripts/release/update-sdk-ts-defs.js
Expand Up @@ -36,9 +36,10 @@ const generateSdkMts = async () => {
);
} catch (error) {
await fs.writeFile(sdkMjs, originalSdkMjsContent);
console.log(
process.stdout.write(
`Error ${error.status} generating Typescript` +
` definitions: '${error.message}'`,
` definitions: '${error.message}'` +
'\n',
);
process.exit(1);
}
Expand Down Expand Up @@ -67,9 +68,10 @@ const generateSdkTs = async () => {
try {
execSync('npx prettier -w sdk.d.ts');
} catch (error) {
console.log(
process.stdout.write(
`Error ${error.status} executing Prettier` +
` to prettify SDK TS definitions: '${error.message}'`,
` to prettify SDK TS definitions: '${error.message}'` +
'\n',
);
process.exit(1);
}
Expand Down