Skip to content

Commit d671254

Browse files
authored
chore: enable prettier (#9)
1 parent 3876060 commit d671254

39 files changed

+793
-369
lines changed

.github/workflows/build-test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ jobs:
4646
run: node ../../common/scripts/install-run-rushx.js test
4747
working-directory: tests/integration
4848

49-
compile:
50-
name: Compile
49+
lint:
50+
name: Lint
5151
runs-on: ubuntu-latest
5252
steps:
5353
- uses: actions/checkout@v3
@@ -56,5 +56,7 @@ jobs:
5656
node-version-file: '.nvmrc'
5757
- name: Rush Install
5858
run: node common/scripts/install-run-rush.js install
59+
- name: Prettier
60+
run: node common/scripts/install-run-rush.js prettier --check
5961
- name: Compile
6062
run: node common/scripts/install-run-rush.js compile

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: CI
22
on:
33
push:
4-
branches: [ "main" ]
4+
branches: ['main']
55
pull_request:
6-
branches: [ "main" ]
6+
branches: ['main']
77
jobs:
88
build:
99
name: Build

.prettierignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Rush files
2+
common/changes/
3+
common/scripts/
4+
common/config/
5+
CHANGELOG.*
6+
7+
# Package manager files
8+
pnpm-lock.yaml
9+
yarn.lock
10+
package-lock.json
11+
shrinkwrap.json
12+
13+
# Build outputs
14+
dist
15+
lib
16+
17+
# Prettier reformats code blocks inside Markdown, which affects rendered output
18+
*.md

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"printWidth": 100,
3+
"useTabs": false,
4+
"tabWidth": 2,
5+
"singleQuote": true
6+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "rush-prettier",
3+
"version": "1.0.0",
4+
"private": true,
5+
"dependencies": {
6+
"prettier": "^2.8.8",
7+
"pretty-quick": "^3.1.3"
8+
}
9+
}

0 commit comments

Comments
 (0)