diff --git a/.prettierrc b/.prettierrc.json similarity index 52% rename from .prettierrc rename to .prettierrc.json index 19bc81991..e3efe60fd 100644 --- a/.prettierrc +++ b/.prettierrc.json @@ -1,9 +1,6 @@ { "$schema": "http://json.schemastore.org/prettierrc", - "overrides": [ - { "files": ".*rc", "options": { "parser": "json" } }, - { "files": ".nvmrc", "options": { "parser": "yaml" } } - ], + "overrides": [{ "files": ".nvmrc", "options": { "parser": "yaml" } }], "plugins": ["prettier-plugin-curly", "prettier-plugin-packagejson"], "useTabs": true } diff --git a/docs/FAQs.md b/docs/FAQs.md index ac186353d..16b758e00 100644 --- a/docs/FAQs.md +++ b/docs/FAQs.md @@ -119,7 +119,7 @@ These are the projects used across many parts of `create-typescript-app`: ## Why tabs? -This repository template configures `"useTabs": true` in the root-level `.prettierrc`. +This repository template configures `"useTabs": true` in the root-level `.prettierrc.json`. It does so because tabs have been phrased by the community as generally better for accessibility: - diff --git a/src/steps/writing/creation/rootFiles.ts b/src/steps/writing/creation/rootFiles.ts index d9146b333..d3b0fd362 100644 --- a/src/steps/writing/creation/rootFiles.ts +++ b/src/steps/writing/creation/rootFiles.ts @@ -43,13 +43,9 @@ export async function createRootFiles(options: Options) { "lib/", "pnpm-lock.yaml", ]), - ".prettierrc": await formatJson({ + ".prettierrc.json": await formatJson({ $schema: "http://json.schemastore.org/prettierrc", overrides: [ - { - files: ".*rc", - options: { parser: "json" }, - }, { files: ".nvmrc", options: { parser: "yaml" },