Skip to content

Commit

Permalink
Merge pull request #237 from totto2727-org/feat/prettier-config
Browse files Browse the repository at this point in the history
chore: Formatter settings and execution by GitHub Actions
  • Loading branch information
lane711 authored Feb 16, 2024
2 parents 27e1b09 + 090648d commit 7c84e3f
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true

[*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,json,yaml,toml,css,html,md}]
indent_style = space
indent_size = 2
28 changes: 28 additions & 0 deletions .github/workflows/static-analytics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Static Analytics

on:
workflow_dispatch:
push:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
static-analytics:
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Packages Install
run: npm ci

- name: Static Check
run: npm run check

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ dist
.wrangler/state
.wrangler/tmp
wrangler.toml
.vscode/settings.json

2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
migrations/
*.md
Empty file added .prettierrc
Empty file.
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"davidanson.vscode-markdownlint",
"editorconfig.editorconfig"
]
}

7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[markdown]": {
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
}
}

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
"generate": "drizzle-kit generate:sqlite --schema=./src/db/schema --out=./migrations",
"up": "wrangler d1 migrations apply sonicjs --local",
"up:prod": "wrangler d1 migrations apply sonicjs",
"tail": "wrangler pages deployment tail"
"tail": "wrangler pages deployment tail",
"check": "run-p check:*",
"check:prettier": "prettier --check --cache . **/*.css",
"fix": "run-s fix:*",
"fix:prettier": "prettier --write --cache . **/*.css"
},
"keywords": [],
"author": "",
Expand Down Expand Up @@ -52,3 +56,4 @@
"uuid": "^9.0.0"
}
}

0 comments on commit 7c84e3f

Please sign in to comment.