Skip to content

Commit 0d54604

Browse files
chore: remove 'c' from knip.jsonc extension (#1247)
## PR Checklist - [x] Addresses an existing open issue: fixes #1246 - [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 I don't know why the trailing comma is happening... but there's no need for the file to be `.jsonc` anyway. It only used to have comments.
1 parent 7c979ee commit 0d54604

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

knip.jsonc renamed to knip.json

File renamed without changes.

script/__snapshots__/migrate-test-e2e.js.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ exports[`expected file changes > cspell.json 1`] = `
146146
}"
147147
`;
148148
149-
exports[`expected file changes > knip.jsonc 1`] = `
150-
"--- a/knip.jsonc
151-
+++ b/knip.jsonc
149+
exports[`expected file changes > knip.json 1`] = `
150+
"--- a/knip.json
151+
+++ b/knip.json
152152
@@ ... @@
153153
{
154154
"$schema": "https://unpkg.com/knip@latest/schema.json",

script/migrate-test-e2e.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import packageData from "../package.json" assert { type: "json" };
88

99
const filesExpectedToBeChanged = [
1010
"README.md",
11-
"knip.jsonc",
11+
"knip.json",
1212
"package.json",
1313
".eslintignore",
1414
".eslintrc.cjs",

src/steps/updateLocalFiles.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ describe("updateLocalFiles", () => {
165165
[
166166
{
167167
"allowEmptyPaths": true,
168-
"files": "./knip.jsonc",
168+
"files": "./knip.json",
169169
"from": " "src/initialize/index.ts",
170170
",
171171
"to": "",
@@ -174,7 +174,7 @@ describe("updateLocalFiles", () => {
174174
[
175175
{
176176
"allowEmptyPaths": true,
177-
"files": "./knip.jsonc",
177+
"files": "./knip.json",
178178
"from": " "src/migrate/index.ts",
179179
",
180180
"to": "",
@@ -183,15 +183,15 @@ describe("updateLocalFiles", () => {
183183
[
184184
{
185185
"allowEmptyPaths": true,
186-
"files": "./knip.jsonc",
186+
"files": "./knip.json",
187187
"from": "["src/index.ts!", "script/initialize*.js"]",
188188
"to": ""src/index.ts!"",
189189
},
190190
],
191191
[
192192
{
193193
"allowEmptyPaths": true,
194-
"files": "./knip.jsonc",
194+
"files": "./knip.json",
195195
"from": "["src/**/*.ts!", "script/**/*.js"]",
196196
"to": ""src/**/*.ts!"",
197197
},
@@ -332,7 +332,7 @@ describe("updateLocalFiles", () => {
332332
[
333333
{
334334
"allowEmptyPaths": true,
335-
"files": "./knip.jsonc",
335+
"files": "./knip.json",
336336
"from": " "src/initialize/index.ts",
337337
",
338338
"to": "",
@@ -341,7 +341,7 @@ describe("updateLocalFiles", () => {
341341
[
342342
{
343343
"allowEmptyPaths": true,
344-
"files": "./knip.jsonc",
344+
"files": "./knip.json",
345345
"from": " "src/migrate/index.ts",
346346
",
347347
"to": "",
@@ -350,15 +350,15 @@ describe("updateLocalFiles", () => {
350350
[
351351
{
352352
"allowEmptyPaths": true,
353-
"files": "./knip.jsonc",
353+
"files": "./knip.json",
354354
"from": "["src/index.ts!", "script/initialize*.js"]",
355355
"to": ""src/index.ts!"",
356356
},
357357
],
358358
[
359359
{
360360
"allowEmptyPaths": true,
361-
"files": "./knip.jsonc",
361+
"files": "./knip.json",
362362
"from": "["src/**/*.ts!", "script/**/*.js"]",
363363
"to": ""src/**/*.ts!"",
364364
},

src/steps/updateLocalFiles.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ export async function updateLocalFiles(options: Options) {
3636
"./README.md",
3737
],
3838
[/\n## Setup Scripts.*$/gs, "", "./.github/DEVELOPMENT.md"],
39-
[`\t\t"src/initialize/index.ts",\n`, ``, "./knip.jsonc"],
40-
[`\t\t"src/migrate/index.ts",\n`, ``, "./knip.jsonc"],
39+
[`\t\t"src/initialize/index.ts",\n`, ``, "./knip.json"],
40+
[`\t\t"src/migrate/index.ts",\n`, ``, "./knip.json"],
4141
[
4242
`["src/index.ts!", "script/initialize*.js"]`,
4343
`"src/index.ts!"`,
44-
"./knip.jsonc",
44+
"./knip.json",
4545
],
4646
[
4747
`["src/**/*.ts!", "script/**/*.js"]`,
4848
`"src/**/*.ts!"`,
49-
"./knip.jsonc",
49+
"./knip.json",
5050
],
5151
// Edge case: migration scripts will rewrite README.md attribution
5252
[

src/steps/writing/creation/rootFiles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
111111
}),
112112
}),
113113
...(!options.excludeLintKnip && {
114-
"knip.jsonc": await formatJson({
114+
"knip.json": await formatJson({
115115
$schema: "https://unpkg.com/knip@latest/schema.json",
116116
entry: ["src/index.ts!"],
117117
ignoreExportsUsedInFile: {

0 commit comments

Comments
 (0)