Skip to content

Add @tanstack/react-router plugin #1373

Add @tanstack/react-router plugin

Add @tanstack/react-router plugin #1373

Workflow file for this run

name: Run Knip against external projects
on:
workflow_dispatch:
pull_request:
push:
branches:
- '**'
tags:
- '!**'
env:
PKG_URL: |
https://pkg.pr.new/knip@${{ github.event.pull_request.head.sha || github.sha }}
jobs:
prepare:
name: Build and publish Knip
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --ignore-scripts --frozen-lockfile
working-directory: packages/knip
- run: bun run build
working-directory: packages/knip
- run: bunx pkg-pr-new publish --compact ./packages/knip
test:
name: Run
runs-on: ubuntu-latest
needs: prepare
strategy:
fail-fast: false
matrix:
project:
- name: create-typescript-app
repo: JoshuaKGoldberg/create-typescript-app
commands: |
pnpm install
pnpm dlx $PKG_URL
- name: slonik
repo: gajus/slonik
commands: |
pnpm install
pnpm dlx $PKG_URL
- name: 10ten-ja-reader
repo: birchill/10ten-ja-reader
commands: |
pnpm install
pnpm dlx $PKG_URL
- name: DefinitelyTyped-tools
repo: microsoft/DefinitelyTyped-tools
commands: |
pnpm install
pnpm dlx $PKG_URL
- name: query
repo: TanStack/query
commands: |
pnpm install
pnpm add -D -w $PKG_URL
pnpm test:knip --cache
pnpm test:knip --cache
- name: argos
repo: argos-ci/argos
commands: |
pnpm i -g pnpm
pnpm install
pnpm add -D -w $PKG_URL
pnpm run knip --fix --no-exit-code
- name: eslint
repo: eslint/eslint
commands: |
npm install --force
npm install --prefix docs
npm install --force -D $PKG_URL
npm run lint:unused -- --cache
npm run lint:unused -- --cache
- name: TypeScript
repo: microsoft/TypeScript
commands: |
npm ci
npm install -D $PKG_URL
npm run knip
- name: mocha
repo: mochajs/mocha
commands: |
npm ci
npm install -D $PKG_URL
npm run lint:knip
- name: InvokeAI
repo: invoke-ai/InvokeAI
sparse-checkout: invokeai/frontend/web
commands: |
cd invokeai/frontend/web
pnpm install
pnpm add -D $PKG_URL
bunx --bun knip --tags=-knipignore
bunx --bun knip --tags=-knipignore --production --fix --no-exit-code --allow-remove-files
bunx --bun knip --tags=-knipignore --production
- name: prettier
repo: prettier/prettier
commands: |
yarn
yarn --cwd scripts/release
yarn --cwd scripts/tools/bundle-test
yarn --cwd scripts/tools/eslint-plugin-prettier-internal-rules
yarn --cwd website
yarn add -D knip@$PKG_URL
yarn knip
- name: freeCodeCamp
repo: freeCodeCamp/freeCodeCamp
commands: |
pnpm i -g pnpm
pnpm install
cp sample.env .env
pnpm run --dir client create:env
# No exit code, since freeCodeCamp project does not use Knip in CI
pnpm run knip:all --no-exit-code
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: oven-sh/setup-bun@v2
- uses: pnpm/action-setup@v4
with:
version: 8
- name: Check out ${{ matrix.project.repo }}
uses: actions/checkout@v4
with:
repository: ${{ matrix.project.repo }}
path: ${{ matrix.project.name }}
sparse-checkout: ${{ matrix.project.sparse-checkout }}
- name: Run Knip in ${{ matrix.project.repo }}
working-directory: ${{ matrix.project.name }}
run: ${{ matrix.project.commands }}