Skip to content

Add npm min-release-age cooldown for supply chain protection #41

Add npm min-release-age cooldown for supply chain protection

Add npm min-release-age cooldown for supply chain protection #41

Workflow file for this run

name: Lint JavaScript
on:
pull_request:
types: [opened, synchronize]
jobs:
lint:
runs-on: ubuntu-latest
steps:
# v4.2.2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
# v4.2.3
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
# v4.3.0
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e
with:
node-version-file: '.nvmrc'
- run: npm ci
- run: npm run lint
env:
CI: true
- name: Verify there's no Prettier diff
run: |
npm run prettier -- --log-level silent
if ! git diff --name-only --exit-code; then
# shellcheck disable=SC2016
echo 'Error: Prettier diff detected! Please run `npm run prettier` and commit the changes.'
exit 1
fi