Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The following reusable workflows are available for consumption by downstream plu
| [reusable-phpcs.yml](reusable-phpcs.yml) | Run PHPCS coding standards | `php-version` |
| [reusable-e2e.yml](reusable-e2e.yml) | Run Playwright E2E tests | `php-version` |
| [reusable-jest.yml](reusable-jest.yml) | Run Jest unit tests | `coverage` |
| [reusable-lint-js.yml](reusable-lint-js.yml) | Run ESLint, Stylelint, Prettier, TSC | None |
| [reusable-js-lints.yml](reusable-js-lints.yml) | Run ESLint, Stylelint, Prettier, TSC | None |

Copilot AI Apr 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reusable-js-lints workflow now accepts boolean inputs (eslint/stylelint/prettier/tsc), but the Inputs column in the reusable workflows table still says "None". Please update this table entry to reflect the available inputs so consumers don’t miss the new controls.

Suggested change
| [reusable-js-lints.yml](reusable-js-lints.yml) | Run ESLint, Stylelint, Prettier, TSC | None |
| [reusable-js-lints.yml](reusable-js-lints.yml) | Run ESLint, Stylelint, Prettier, TSC | `eslint`, `stylelint`, `prettier`, `tsc` |

Copilot uses AI. Check for mistakes.
| [reusable-build.yml](reusable-build.yml) | Build plugin artifact | `php-version`, `artifact-name`, `artifact-path` |
| [reusable-wp-playground-pr-preview.yml](reusable-wp-playground-pr-preview.yml) | Post WP Playground preview | `run-id`, `artifact-prefix`, `artifact-filename`, `artifacts-to-keep` |

Expand Down Expand Up @@ -92,11 +92,15 @@ Runs Jest unit tests for JavaScript.
- **Secrets:**
- `CODECOV_TOKEN` (optional): Token for uploading coverage to Codecov.

### reusable-lint-js.yml
### reusable-js-lints.yml

Runs ESLint, Stylelint, Prettier, and TypeScript checks.

- **Inputs:** None.
- **Inputs:**
- `eslint` (boolean, default: `true`): Run ESLint.
- `stylelint` (boolean, default: `true`): Run Stylelint.
- `prettier` (boolean, default: `true`): Run Prettier.
- `tsc` (boolean, default: `true`): Run TypeScript

Copilot AI Apr 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tsc input description is missing ending punctuation ("Run TypeScript"). Please make it consistent with the other bullets (e.g., add a trailing period).

Suggested change
- `tsc` (boolean, default: `true`): Run TypeScript
- `tsc` (boolean, default: `true`): Run TypeScript.

Copilot uses AI. Check for mistakes.

### reusable-build.yml

Expand Down Expand Up @@ -148,7 +152,10 @@ name: CI
on: [push, pull_request]
jobs:
lint:
uses: AxeWP/plugin-infra/.github/workflows/reusable-lint-js.yml@main
uses: AxeWP/plugin-infra/.github/workflows/reusable-js-lints.yml@main
with:
prettier: true
tsc: false
phpstan:
uses: AxeWP/plugin-infra/.github/workflows/reusable-phpstan.yml@main
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
name: Run JS Lint
name: Run JS Lints

on:
workflow_call:
inputs:
eslint:
description: 'Run ESLint check'
required: false
type: boolean
default: true
tsc:
description: 'Run TypeScript check'
required: false
type: boolean
default: true
stylelint:
description: 'Run Stylelint check'
required: false
type: boolean
default: true
prettier:
description: 'Run Prettier check'
required: false
type: boolean
default: true

permissions: {}

Expand Down Expand Up @@ -29,19 +50,20 @@ jobs:

- name: Run ESLint
id: eslint
if: ${{ inputs.eslint }}
run: npm run lint:js

- name: Run TypeScript check
id: typescript
if: ${{ !cancelled() }}
if: ${{ inputs.tsc && !cancelled() }}
run: npm run lint:js:types

- name: Run Stylelint
id: stylelint
if: ${{ !cancelled() }}
if: ${{ inputs.stylelint && !cancelled() }}
run: npm run lint:css

- name: Run Prettier check
id: prettier
if: ${{ !cancelled() }}
if: ${{ inputs.prettier && !cancelled() }}
run: npm run format -- --check