Skip to content
Closed
Show file tree
Hide file tree
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
16 changes: 16 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Prettier check

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- run: npm ci
- run: npm run format:check
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
.cache
public/
static/admin/*.bundle.*
.DS_Store
yarn-error.log
.vscode
.netlify
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"build": "npm run clean && gatsby build",
"develop": "npm run clean && gatsby develop",
"serve": "gatsby serve",
"format": "prettier --trailing-comma es5 --no-semi --single-quote --write --tab-width 4 \"{gatsby-*.js,src/**/*.js}\"",
"test": "echo \"Error: no test specified\" && exit 1",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md,mdx,yml,yaml}\"",
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md,mdx,yml,yaml}\"",
"dev": "npx concurrently \"npx netlify-cms-proxy-server\" \"npm start -- --progress\""
},
"devDependencies": {
Expand Down
7 changes: 7 additions & 0 deletions prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 4,
"endOfLine": "lf"
}
Loading