Skip to content

Commit 6fa6698

Browse files
authored
fix: should not include extensions for markdown when excluded (#1625)
<!-- 👋 Hi, thanks for sending a PR to create-typescript-app! 💖. Please fill out all fields below and make sure each item is true and [x] checked. Otherwise we may not be able to review your PR. --> ## PR Checklist - [x] Addresses an existing open issue: fixes #1622 - [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 <!-- Description of what is changed and how the code change does that. --> This PR excludes the extension for linting Markdown if the option specifies excluding that.
1 parent 33c276d commit 6fa6698

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

src/steps/writing/creation/dotVSCode.test.ts

+2-14
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,7 @@ describe("createDotVSCode", () => {
5656
expect(await createDotVSCode(fakeOptions(() => true)))
5757
.toMatchInlineSnapshot(`
5858
{
59-
"extensions.json": "{
60-
"recommendations": [
61-
"DavidAnson.vscode-markdownlint",
62-
"dbaeumer.vscode-eslint",
63-
"esbenp.prettier-vscode"
64-
]
65-
}
59+
"extensions.json": "{ "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] }
6660
",
6761
"settings.json": "{
6862
"editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" },
@@ -244,13 +238,7 @@ describe("createDotVSCode", () => {
244238
expect(await createDotVSCode(fakeOptions(() => true, "bin/index.js")))
245239
.toMatchInlineSnapshot(`
246240
{
247-
"extensions.json": "{
248-
"recommendations": [
249-
"DavidAnson.vscode-markdownlint",
250-
"dbaeumer.vscode-eslint",
251-
"esbenp.prettier-vscode"
252-
]
253-
}
241+
"extensions.json": "{ "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] }
254242
",
255243
"launch.json": "{
256244
"configurations": [

src/steps/writing/creation/dotVSCode.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export async function createDotVSCode(options: Options) {
66
return {
77
"extensions.json": await formatJson({
88
recommendations: [
9-
"DavidAnson.vscode-markdownlint",
9+
!options.excludeLintMd && "DavidAnson.vscode-markdownlint",
1010
"dbaeumer.vscode-eslint",
1111
"esbenp.prettier-vscode",
1212
!options.excludeLintSpelling && "streetsidesoftware.code-spell-checker",

0 commit comments

Comments
 (0)