Skip to content

Commit 07c0abc

Browse files
authoredJan 9, 2024
feat: rename .prettierrc to .prettierrc.json (#1215)
## PR Checklist - [x] Addresses an existing open issue: fixes #1214 - [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 Renames the file, removes one of its overrides, and updates templates.
1 parent d793847 commit 07c0abc

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed
 

‎.prettierrc ‎.prettierrc.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"$schema": "http://json.schemastore.org/prettierrc",
3-
"overrides": [
4-
{ "files": ".*rc", "options": { "parser": "json" } },
5-
{ "files": ".nvmrc", "options": { "parser": "yaml" } }
6-
],
3+
"overrides": [{ "files": ".nvmrc", "options": { "parser": "yaml" } }],
74
"plugins": ["prettier-plugin-curly", "prettier-plugin-packagejson"],
85
"useTabs": true
96
}

‎docs/FAQs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ These are the projects used across many parts of `create-typescript-app`:
119119

120120
## Why tabs?
121121

122-
This repository template configures `"useTabs": true` in the root-level `.prettierrc`.
122+
This repository template configures `"useTabs": true` in the root-level `.prettierrc.json`.
123123
It does so because tabs have been phrased by the community as generally better for accessibility:
124124

125125
- <https://github.com/11ty/eleventy/issues/3098>

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

+1-5
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,9 @@ export async function createRootFiles(options: Options) {
4343
"lib/",
4444
"pnpm-lock.yaml",
4545
]),
46-
".prettierrc": await formatJson({
46+
".prettierrc.json": await formatJson({
4747
$schema: "http://json.schemastore.org/prettierrc",
4848
overrides: [
49-
{
50-
files: ".*rc",
51-
options: { parser: "json" },
52-
},
5349
{
5450
files: ".nvmrc",
5551
options: { parser: "yaml" },

0 commit comments

Comments
 (0)
Please sign in to comment.