Improve config for codespaces (#71) #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: validate | |
on: | |
# run on push but only for the main branch | |
push: | |
branches: | |
- main | |
# run for every pull request | |
pull_request: {} | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: 🧹 Check code formatting with Prettier | |
run: find . -name package.json -maxdepth 2 -type f -execdir npm run format:check ';' | |
- name: 👕 Lint Node.js code with ESLint | |
run: find . -name package.json -maxdepth 2 -type f -execdir npm run lint ';' |