Skip to content

Commit ae44d67

Browse files
authoredApr 15, 2024
feat: remove disable of no-case-declarations (#1468)
## PR Checklist - [x] Addresses an existing open issue: fixes #1467 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Removes the disable of the rule, and adds `{}` blocks around the two violations in the code base.
1 parent 1794fb1 commit ae44d67

File tree

5 files changed

+4
-6
lines changed

5 files changed

+4
-6
lines changed
 

‎.eslintrc.cjs

-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ module.exports = {
155155
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }],
156156

157157
// These on-by-default rules don't work well for this repo and we like them off.
158-
"no-case-declarations": "off",
159158
"no-constant-condition": "off",
160159
"no-inner-declarations": "off",
161160
"no-mixed-spaces-and-tabs": "off",

‎src/shared/options/augmentOptionsWithExcludes.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export async function augmentOptionsWithExcludes(
7171
base,
7272
...getExclusions(options, base),
7373
};
74-
case "prompt":
74+
case "prompt": {
7575
const exclusionsNotEnabled = new Set(
7676
filterPromptCancel(
7777
await prompts.multiselect({
@@ -99,6 +99,7 @@ export async function augmentOptionsWithExcludes(
9999
),
100100
),
101101
};
102+
}
102103
}
103104
}
104105

‎src/shared/options/ensureRepositoryExists.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export async function ensureRepositoryExists(
6666
});
6767
return { github, repository };
6868

69-
case "different":
69+
case "different": {
7070
const newRepository = filterPromptCancel(
7171
await prompts.text({
7272
message: `What would you like to call the repository?`,
@@ -79,6 +79,7 @@ export async function ensureRepositoryExists(
7979

8080
repository = newRepository;
8181
break;
82+
}
8283

8384
case "local":
8485
github = undefined;

‎src/steps/writing/creation/createESLintRC.test.ts

-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ describe("createESLintRC", () => {
9797
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }],
9898
9999
// These on-by-default rules don't work well for this repo and we like them off.
100-
"no-case-declarations": "off",
101100
"no-constant-condition": "off",
102101
"no-inner-declarations": "off",
103102
"no-mixed-spaces-and-tabs": "off",
@@ -238,7 +237,6 @@ describe("createESLintRC", () => {
238237
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }],
239238
240239
// These on-by-default rules don't work well for this repo and we like them off.
241-
"no-case-declarations": "off",
242240
"no-constant-condition": "off",
243241
"no-inner-declarations": "off",
244242
"no-mixed-spaces-and-tabs": "off",

‎src/steps/writing/creation/createESLintRC.ts

-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ module.exports = {
189189
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }],
190190
191191
// These on-by-default rules don't work well for this repo and we like them off.
192-
"no-case-declarations": "off",
193192
"no-constant-condition": "off",
194193
"no-inner-declarations": "off",
195194
"no-mixed-spaces-and-tabs": "off",

0 commit comments

Comments
 (0)