| name: Style Checks |
| |
| on: [push, pull_request] |
| |
| permissions: |
| contents: read |
| |
| jobs: |
| lint: |
| if: github.repository == 'nodejs/node-addon-api' |
| strategy: |
| matrix: |
| node-version: [22.x] |
| os: [ubuntu-latest] |
| |
| runs-on: ${{ matrix.os }} |
| steps: |
| - name: Harden Runner |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 |
| with: |
| egress-policy: audit |
| |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| with: |
| fetch-depth: 0 |
| - run: git branch -a |
| - name: Use Node.js ${{ matrix.node-version }} |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 |
| with: |
| node-version: ${{ matrix.node-version }} |
| - run: npm install |
| - run: FORMAT_START=refs/remotes/origin/main npm run lint |