Skip to content

Commit

Permalink
lint and format setup
Browse files Browse the repository at this point in the history
Signed-off-by: bryans-go <sabrinabryan1990@gmail.com>
  • Loading branch information
divanshu-go committed Oct 12, 2024
1 parent 5d29dd2 commit 5d213bc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Format

on:
push:
branches:
- main
pull_request:
branches:
- main
Expand All @@ -16,11 +19,11 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16' # Use the Node.js version your project requires
node-version: '16'

- name: Install dependencies
run: npm install

- name: Run Prettier to check formatting
run: npm run prettier -- --check
continue-on-error: false # Fail the workflow if formatting issues are found
continue-on-error: false
13 changes: 7 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: Lint and Format
name: Lint

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint-and-format:
lint:
runs-on: ubuntu-latest

steps:
Expand All @@ -16,13 +19,11 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16' # or whichever version your project requires
node-version: '16'

- name: Install dependencies
run: npm install

- name: Run Prettier to check formatting
run: npm run format -- --check

- name: Run ESLint to check for linting issues
run: npm run lint
continue-on-error: false

0 comments on commit 5d213bc

Please sign in to comment.