Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Add lint check to PRs (next) #799

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Check PRs

on:
pull_request

jobs:
lint-react:
name: Lint React codebase
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
- run: npm ci
working-directory: packages/react
- run: npm run lint
working-directory: packages/react

lint-vue3:
name: Lint Vue3 codebase
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
- run: npm ci
working-directory: packages/vue3
- run: npm run lint
working-directory: packages/vue3

lint:
name: Lint codebase
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
- run: npm ci
- run: npm run lint:check
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "vite build --mode prod",
"preview": "vite preview",
"lint": "eslint --fix src/",
"lint:check": "eslint src/",
"prepare": "husky install",
"test": "jest tests"
},
Expand Down Expand Up @@ -88,4 +89,4 @@
"vite-plugin-vue2": "^2.0.2",
"vue-template-compiler": "^2.7.8"
}
}
}
1 change: 1 addition & 0 deletions packages/vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"postinstall": "npm run build",
"lint": "prettier --check src",
"lint:fix": "prettier --write src"
},
"lint-staged": {
Expand Down
Loading