Setup React Web
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Scaffold a React + TypeScript web application with Vite, then layer on this catalog’s standard
test/coverage/lint/format/e2e toolchain — Vitest, Testing Library, ESLint or Oxlint, Prettier, Stylelint,
Playwright, an optional Storybook setup, and sonar-project.properties when Sonar is enabled. It also makes the
scaffold ready for the catalog’s UI contract (see Building user interfaces):
a Playwright component-testing project with a component gallery, axe accessibility checks, and a .ui-quality.yml.
Purpose
iru-setup-react-web bootstraps a new React web app from npm create vite@latest <name> — --template
react-ts, then wires in the house toolchain this catalog expects every TypeScript project to carry: Vitest
(jsdom, v8 coverage with lcov) plus @testing-library/react for unit tests, ESLint 10 flat config with
eslint-plugin-react-hooks (or the Vite template’s own Oxlint, kept by choice), Prettier, Stylelint 17 for
CSS, Playwright for an end-to-end smoke test under e2e/, an optional Storybook setup, and — when Sonar is
enabled — sonar-project.properties. There is no publish/distribution question for this skill, since a
web app isn’t published to a package registry or an app store. Every step was proven against the actual
current tooling (Vite 8, ESLint 10, Vitest 5, Playwright 1.63, Stylelint 17, Storybook 10) in a throwaway
scaffold, so the gotchas called out along the way are observed behavior, not speculation.
A dedicated UI-contract step (Step 6b, with reference/ui-screenshots.ts) adds Playwright’s built-in mount()
component testing driven by a Vite-served gallery (playwright/gallery/), @axe-core/playwright, a shared
e2e/support/ui-screenshots.ts helper, and a sample screen spec that captures .ui-screenshots/screen/App/
across left-to-right/right-to-left x light/dark with an accessibility check in every cell. It also switches the
template’s CSS to logical properties (so right-to-left captures mirror) and fixes the template’s low-contrast accent
colour, then writes .ui-quality.yml at the repository root with the chosen accessibility level.
Plugin
Shipped by the iru-typescript plugin of the ai-catalog marketplace (install with /plugin install iru-typescript@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
Pre-resolved parameters passed by an orchestrating skill (e.g.
Setup TypeScript Repository) as newline-separated |
None |
|
No |
|
Root directory basename |
|
Yes (unless supplied via |
One-line project description written into |
None |
|
Yes (unless supplied via |
Resolved via |
None — user must choose |
|
Yes (unless supplied via |
Populates |
None |
|
No |
Whether the repository is open source ( |
Asked with |
|
No |
|
|
|
No |
|
Asked once with |
|
No |
Whether to add an optional Storybook setup ( |
|
|
No |
|
Resolved only when the |
|
No |
|
|
|
No |
|
Asked with |
|
No |
|
|
|
No |
|
Derived from whether |
Outputs
-
A Vite + React + TypeScript app scaffolded at the repository root or a subdirectory, including
package.json,vite.config.ts,tsconfig.json(project references),src/, andpublic/. -
vitest.config.ts,src/test/setup.ts, andsrc/App.test.tsxfor unit testing. -
eslint.config.js(or Oxlint left in place, perkeep-oxlint),.prettierrc,.prettierignore,.stylelintrc.json. -
playwright.config.tsande2e/smoke.spec.tsfor end-to-end testing, with the Chromium browser binary installed locally. -
.ui-quality.ymlat the repository root (accessibility,directions: [ltr, rtl],themes: [light, dark]). -
The UI-contract test scaffold:
e2e/support/ui-screenshots.ts(fromreference/ui-screenshots.ts),playwright/gallery/index.html+main.tsx,src/App.story.tsx,e2e/components/App.spec.ts, acomponentsPlaywright project, the@axe-core/playwrightdev dependency, and logical-property CSS fixes; running the specs produces the.ui-screenshots/captures (kept out of version control). -
.storybook/and its scripts, only ifstorybook: yes. -
sonar-project.propertiesat the repository root, only ifsonarresolved tocloudorself-hosted. -
tsconfig.e2e.jsonand an updatedtsconfig.jsonreference list, sotsc -btype-checkse2e/too. -
A report that opens by repeating the announced mode (scaffolded from scratch or updated an existing setup), lists per owned artifact the action taken (created / updated / replaced / kept as is / removed) and each mismatch left by a kept artifact (e.g. a
sonar-project.propertiesleft aftersonar: none, a Playwright config still listing Firefox/WebKit), every verification command run (typecheck, lint, format, test, coverage, build, e2e) and its result, thevisibilityused for Sonar and where it came from, plus explicit warnings to review generated files, wireSONAR_TOKENin CI if Sonar was enabled, and provision Playwright browsers in CI.
Execution flow
Dependencies
Invokes
None — iru-setup-react-web is a leaf skill; it does not call any other skill in this catalog.
Invoked by
-
Setup TypeScript Repository — Step 5, flavor react scaffold, via the
iru-isolated-skill-executoragent.
Also runnable stand-alone.
Source
SKILL.md on GitHub — the file this page was generated from.