Skip to content

Commit

Permalink
Fix trailing comma (#247)
Browse files Browse the repository at this point in the history
* added .prettierrc.json
* modified:   .gitignore
* yarn run format
* fix check format workflow
  • Loading branch information
Tetrax-10 authored Feb 11, 2024
1 parent 6348755 commit 862f16b
Show file tree
Hide file tree
Showing 16 changed files with 1,318 additions and 1,273 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/on_pr_check_code_format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Check Code Format

on:
pull_request:
branches:
- main

workflow_dispatch:

permissions:
contents: write

jobs:
check_js_code_format:
name: Check JS code format
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Check format
uses: creyD/[email protected]
with:
prettier_options: --check .
dry: true
only_changed: true
github_token: ${{ secrets.GITHUB_TOKEN }}

check_py_code_format:
name: Check PY code format
runs-on: ubuntu-latest
needs: check_js_code_format

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Check format
uses: psf/black@stable
with:
options: '--exclude="3rd party"'
src: "."
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

workflow_dispatch:

permissions:
contents: write
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/_site
node_modules
node_modules
dist
3 changes: 3 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"trailingComma": "es5"
}
Loading

0 comments on commit 862f16b

Please sign in to comment.