Skip to content

Commit

Permalink
Enable prettier (#10)
Browse files Browse the repository at this point in the history
Enable prettier in the repo
  • Loading branch information
JamesBurnside authored Feb 18, 2021
1 parent 03485de commit eedd3b0
Show file tree
Hide file tree
Showing 19 changed files with 386 additions and 83 deletions.
22 changes: 22 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Project files
package.json
package-lock.json
dist/
docs/
node_modules/
.storybook/

# Rush files
common/changes/
common/scripts/
common/config/
CHANGELOG.*

# Package manager files
pnpm-lock.yaml
yarn.lock
package-lock.json
shrinkwrap.json

# Prettier reformats code blocks inside Markdown, which affects rendered output
*.md
File renamed without changes.
9 changes: 9 additions & 0 deletions common/autoinstallers/rush-prettier/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "rush-prettier",
"version": "1.0.0",
"private": true,
"dependencies": {
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0"
}
}
325 changes: 325 additions & 0 deletions common/autoinstallers/rush-prettier/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions common/config/rush/command-line.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
"description": "Run jest tests in each project.",
"enableParallelism": true,
"allowWarningsInSuccessfulBuild": true
},
{
"commandKind": "global",
"name": "prettier",
"summary": "Used by the pre-commit Git hook. This command invokes Prettier to reformat staged changes.",
"autoinstallerName": "rush-prettier",
"shellCommand": "pretty-quick --staged"
}
// {
// "commandKind": "global",
Expand Down
25 changes: 0 additions & 25 deletions common/git-hooks/commit-msg.sample

This file was deleted.

Loading

0 comments on commit eedd3b0

Please sign in to comment.