Skip to content

Commit

Permalink
chore: add prettier, husky, and formatting CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
tsa96 committed Aug 18, 2024
1 parent 26fbab7 commit 1eb0228
Show file tree
Hide file tree
Showing 6 changed files with 802 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Formatting Checks

on:
pull_request

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'

- name: Setup Node.js 18
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm install

- name: Formatting Checks
run: npm run format:check

- name: TypeScript Build
run: npm run build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules/
dist/
docs/
.husky/
.github/
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
12 changes: 12 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"printWidth": 120,
"tabWidth": 4,
"useTabs": true,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "always",
"endOfLine": "lf",
"bracketSpacing": true,
"bracketSameLine": false
}
Loading

0 comments on commit 1eb0228

Please sign in to comment.