feat: add conditional inputs to js-lints#6
Conversation
There was a problem hiding this comment.
Pull request overview
Adds per-linter toggles to the reusable-js-lints GitHub Actions workflow so downstream repos can selectively run ESLint, TypeScript, Stylelint, and/or Prettier.
Changes:
- Added
workflow_callboolean inputs (eslint,tsc,stylelint,prettier) with defaults to enable/disable individual checks. - Made each lint step conditional on its corresponding input.
- Updated workflows documentation to reference
reusable-js-lints.ymland describe the new inputs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/reusable-js-lints.yml | Introduces boolean inputs and guards each linting step with if: conditions. |
| .github/workflows/README.md | Updates workflow listing and documents the new reusable-js-lints inputs and usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | [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 | |
There was a problem hiding this comment.
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.
| | [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` | |
| - `eslint` (boolean, default: `true`): Run ESLint. | ||
| - `stylelint` (boolean, default: `true`): Run Stylelint. | ||
| - `prettier` (boolean, default: `true`): Run Prettier. | ||
| - `tsc` (boolean, default: `true`): Run TypeScript |
There was a problem hiding this comment.
The tsc input description is missing ending punctuation ("Run TypeScript"). Please make it consistent with the other bullets (e.g., add a trailing period).
| - `tsc` (boolean, default: `true`): Run TypeScript | |
| - `tsc` (boolean, default: `true`): Run TypeScript. |
Add individual controls for reusable-js-lints