Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

docs(tip): add package.json tip to improve a prettier setup #68

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/content/tips/prettier-config-in-package-json.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
kind: package-json
title: Set package-level Prettier configuration
description: Keep the project's root folder clean from extra configuration files while enforcing an organization-wide codestyle.
contributor: https://github.com/filiphsps
snippet: |
{
"prettier": "@nordcom/prettier",
"scripts": {
"@nordcom/prettier": "0.1.1"
}
}
---

By setting the Prettier configuration directly in `package.json`, you avoid both the issue of saturating your workspace's root folder with another config file as well as arguably more importantly also completely eliminating inconsistencies in Prettier rules between projects.