Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
112 lines
2.8 KiB
YAML
112 lines
2.8 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- next
|
|
- v*
|
|
- patch-release
|
|
- "!renovate/**"
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version: "24"
|
|
cache: "yarn"
|
|
|
|
- name: Install Dependencies
|
|
run: yarn install --immutable
|
|
|
|
- name: Check Dependencies
|
|
run: yarn lint:deps
|
|
|
|
- name: Check JSDoc Types
|
|
run: yarn lint:typecheck
|
|
|
|
- name: Lint ESLint
|
|
run: yarn lint:eslint
|
|
|
|
- name: Lint Prettier
|
|
run: yarn lint:prettier
|
|
|
|
- name: Spellcheck
|
|
run: yarn lint:spellcheck
|
|
|
|
- name: Lint Changelog
|
|
run: yarn lint:changelog
|
|
|
|
- name: Lint "format test"
|
|
run: yarn lint:format-test
|
|
|
|
- name: Lint docs code block
|
|
run: yarn prettier "{docs,website/versioned_docs/version-stable}/**/*.md" --check
|
|
env:
|
|
# Make Prettier throws on embedded format
|
|
PRETTIER_DEBUG: true
|
|
|
|
- name: Lint workflow files
|
|
run: |
|
|
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
|
|
./actionlint -color
|
|
shell: bash
|
|
|
|
- name: Dependency Review
|
|
# Doesn't support push event https://github.com/actions/dependency-review-action/issues/826
|
|
if: github.event_name == 'pull_request'
|
|
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
|
|
|
|
- name: Validate renovate config
|
|
run: yarn dlx --package renovate@latest renovate-config-validator
|
|
|
|
- name: Run yarn (/)
|
|
run: |
|
|
yarn
|
|
yarn dedupe --check
|
|
|
|
- name: Run yarn (/website)
|
|
working-directory: website
|
|
run: |
|
|
yarn
|
|
yarn dedupe --check
|
|
|
|
- name: Run yarn (/scripts/release)
|
|
working-directory: scripts/release
|
|
run: |
|
|
yarn
|
|
yarn dedupe --check
|
|
|
|
- name: Run yarn (/scripts/tools/bundle-test)
|
|
working-directory: scripts/tools/bundle-test
|
|
run: |
|
|
yarn
|
|
yarn dedupe --check
|
|
|
|
- name: Run yarn (/scripts/tools/eslint-plugin-prettier-internal-rules)
|
|
working-directory: scripts/tools/eslint-plugin-prettier-internal-rules
|
|
run: |
|
|
yarn
|
|
yarn dedupe --check
|
|
|
|
- name: Knip
|
|
run: yarn lint:knip
|
|
|
|
- name: Ensure no files changed
|
|
run: node ./scripts/ensure-no-files-changed.js
|