Add check-format script and update lint-js.yml (#2357)
* chore: Add check-format script to package.json for code formatting consistency * chore: Update lint-js.yml to use npm run check-format instead of npm run format
This commit is contained in:
parent
fa4dd19ce6
commit
340df293ba
2 changed files with 4 additions and 7 deletions
8
.github/workflows/lint-js.yml
vendored
8
.github/workflows/lint-js.yml
vendored
|
|
@ -45,10 +45,6 @@ jobs:
|
|||
- name: Run Prettier
|
||||
run: |
|
||||
cd src/frontend
|
||||
npm run format
|
||||
- name: Commit changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: Apply Prettier formatting
|
||||
branch: ${{ github.head_ref }}
|
||||
npm run check-format
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@
|
|||
"build": "vite build",
|
||||
"serve": "vite preview",
|
||||
"format": "npx prettier --write \"{tests,src}/**/*.{js,jsx,ts,tsx,json,md}\" --ignore-path .prettierignore",
|
||||
"check-format": "npx prettier --check \"{tests,src}/**/*.{js,jsx,ts,tsx,json,md}\" --ignore-path .prettierignore",
|
||||
"type-check": "tsc --noEmit --pretty --project tsconfig.json && vite"
|
||||
},
|
||||
"eslintConfig": {
|
||||
|
|
@ -132,4 +133,4 @@
|
|||
"ua-parser-js": "^1.0.38",
|
||||
"vite": "^5.3.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue