Skip to content

Commit

Permalink
feat: rename .prettierrc to .prettierrc.json (#1215)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
JoshuaKGoldberg committed Jan 9, 2024
1 parent d793847 commit 07c0abc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
5 changes: 1 addition & 4 deletions .prettierrc → .prettierrc.json
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion docs/FAQs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

- <https://github.com/11ty/eleventy/issues/3098>
Expand Down
6 changes: 1 addition & 5 deletions src/steps/writing/creation/rootFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down

0 comments on commit 07c0abc

Please sign in to comment.