Skip to content

Commit fbfa041

Browse files
build: enabled ESLint curly rule (#429)
## PR Checklist - [x] Addresses an existing open issue: fixes #425 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Runs `--fix` to fix up violations.
1 parent 330e7e5 commit fbfa041

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ module.exports = {
126126
"no-inner-declarations": "off",
127127

128128
// Stylistic concerns that don't interfere with Prettier
129+
curly: ["error", "all"],
129130
"padding-line-between-statements": "off",
130131
"@typescript-eslint/padding-line-between-statements": [
131132
"error",

script/setup.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ async function withSpinner(
4444

4545
try {
4646
const success = await callback();
47-
if (success === false) s.stop(chalk.yellow("⚠️ " + warnText));
48-
else s.stop(chalk.green("✅ " + successText));
47+
s.stop(
48+
success === false
49+
? chalk.yellow("⚠️ " + warnText)
50+
: chalk.green("✅ " + successText)
51+
);
4952
} catch (error) {
5053
s.stop(chalk.red("❌ " + stopText));
5154

@@ -609,7 +612,10 @@ try {
609612
}
610613
);
611614
} catch (error) {
612-
if (error.status === 403) return false;
615+
if (error.status === 403) {
616+
return false;
617+
}
618+
613619
throw error;
614620
}
615621
},

0 commit comments

Comments
 (0)