Skip to content

chore: lint imports

chore: lint imports #7

Workflow file for this run

name: nodejs
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@v4
with:
fetch-depth: 0
- name: 🤝 Set Node version from .nvmrc
run: echo NVMRC=`cat .nvmrc` >> $GITHUB_ENV
- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NVMRC }}
- name: 📥 Download deps
run: >
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 install && cd -
echo "::endgroup::"
done
- name: 🧹 Check code formatting with Prettier
run: >
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 format:check && cd -
echo "::endgroup::"
done
- name: 👕 Lint code with ESLint
run: >
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 -
echo "::endgroup::"
done