-
Notifications
You must be signed in to change notification settings - Fork 11
chore: add github actions for linting and formatting checks #38
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small non-consequential suggestion.
client/savePayment/html/package.json
Outdated
"preview": "vite preview", | ||
"start": "vite", | ||
"format": "npx prettier . --write" | ||
"format": "npx prettier . --write", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think you can drop the npx
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch. Just removed npx
from here.
find . -name package.json -maxdepth 10 -type f -not -path "*/node_modules/*" | while read -r file; do | ||
directory=$(dirname "$file") | ||
echo "::group:: $directory" | ||
cd "$directory" && npm run lint && cd - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you're at it, would it be helpful to have these as pre-commit
hooks as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of adding them as precommit hooks too. Let's do that in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This PR adds GitHub Actions for running prettier formatting checks and eslint checks. Here's a screenshot of the output:

One goal with this repo is to support other languages like java and php. So I've avoided adding a root package.json and using a monorepo for that reason.