mirror of
https://github.com/bitwarden/directory-connector
synced 2026-02-25 08:53:30 +00:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
- "rc"
|
|
- "hotfix-rc"
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
name: Run linter
|
|
if: ${{ startsWith(github.head_ref, 'version_bump_') == false }}
|
|
runs-on: ubuntu-24.04
|
|
|
|
steps:
|
|
- name: Check out repo
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Get Node version
|
|
id: retrieve-node-version
|
|
run: |
|
|
NODE_NVMRC=$(cat .nvmrc)
|
|
NODE_VERSION=${NODE_NVMRC/v/''}
|
|
echo "node_version=$NODE_VERSION" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
|
with:
|
|
cache: 'npm'
|
|
cache-dependency-path: '**/package-lock.json'
|
|
node-version: ${{ steps.retrieve-node-version.outputs.node_version }}
|
|
|
|
- name: Install Node dependencies
|
|
run: npm ci
|
|
|
|
- name: Run ESLint and Prettier
|
|
run: npm run lint
|