chore: Update lint-js workflow to run Prettier and commit changes
Apply Prettier formatting to the codebase by running the Prettier command in the src/frontend directory. Also, add a step to commit the changes automatically using the git-auto-commit-action. This update improves code formatting and ensures consistency in the repository.
This commit is contained in:
parent
58d596b8e3
commit
c22d7a4a7a
1 changed files with 11 additions and 12 deletions
23
.github/workflows/lint-js.yml
vendored
23
.github/workflows/lint-js.yml
vendored
|
|
@ -10,8 +10,10 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-linters:
|
run-linters:
|
||||||
name: Run linters
|
name: Run Prettier
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|
@ -38,16 +40,13 @@ jobs:
|
||||||
npm install
|
npm install
|
||||||
if: ${{ steps.setup-node.outputs.cache-hit != 'true' }}
|
if: ${{ steps.setup-node.outputs.cache-hit != 'true' }}
|
||||||
|
|
||||||
- name: Run linters
|
- name: Run Prettier
|
||||||
uses: wearerequired/lint-action@v2
|
run: |
|
||||||
|
cd src/frontend
|
||||||
|
npm run format
|
||||||
|
- name: Commit changes
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.github_token }}
|
commit_message: Apply Prettier formatting
|
||||||
auto_fix: true
|
branch: ${{ github.head_ref }}
|
||||||
git_email: "gabriel@langflow.org"
|
|
||||||
# Enable linters
|
|
||||||
# eslint: true
|
|
||||||
# eslint_auto_fix: true
|
|
||||||
prettier: true
|
|
||||||
prettier_auto_fix: true
|
|
||||||
prettier_args: '--write \"{tests,src}/**/*.{js,jsx,ts,tsx,json,md}\" --ignore-path .prettierignore'
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue