sfnext-quality-gates
БесплатноБез исполняемых скриптовНе проверенRun and fix the Storefront Next quality gates before a PR or deploy: OxLint (type-aware, --max-warnings 0) plus Biome formatting, lint:a11y, lint:css…
от SalesforceCommerceCloud★ 58 звёзд на GitHubОб этом скилле
Storefront Next Quality Gates
Your project enforces style, types, size and accessibility with a few commands. CI runs the same ones, and lint is strict: any warning fails.
Pre-PR checklist
pnpm lint # OxLint (type-aware, --max-warnings 0) then Biome format check
pnpm typecheck # route typegen + tsc --noEmit
pnpm test # unit tests
pnpm storybook:test --type=snapshot # if you touched components or stories
pnpm bundlesize # if you added dependencies or large components
If you changed UI, also run pnpm storybook:test --type=interaction and --type=a11y (needs pnpm exec playwright install chromium). Fix formatting and auto-fixable lint in one go with pnpm lint:fix.
Commands
| Command | What it does |
|---|---|
pnpm lint |
oxlint --type-aware --report-unused-disable-directives --max-warnings 0 (e2e excluded) then biome format check, then the e2e package's own lint |
pnpm lint:fix |
oxlint --fix then biome format --write |
pnpm format / pnpm format:check |
Biome formatting only (4-space indent, 120 columns, single quotes in JS, double in JSX) |
pnpm lint:a11y |
Reports only jsx-a11y/* findings; exit 1 if any (see storefront-next:sfnext-accessibility) |
pnpm lint:css |
After a build, checks the built app stylesheet for Tailwind candidates that only come from stories, tests or docs (dead or story-only classes). Run pnpm build first |
pnpm typecheck |
react-router typegen then tsc --noEmit (uses extra heap) |
node scripts/check-typescript-only.js |
Fails if .js/.jsx/.mjs/.cjs exist under src/ |
pnpm bundlesize |
Builds with BUNDLES_SIZE_CHECK=true; fails if chunks exceed limits in package.json#bundlesize (client and server lists) |
pnpm bundlesize:compare |
Compares two bundle metadata files: node scripts/compare-bundlesize.mjs --baseline <path> --candidate <path> [--tolerance <pct>] |
pnpm lighthouse:ci |
lhci autorun using lighthouserc.cjs (build first; it starts the preview server itself) |
pnpm config:inspect |
Prints the resolved config to debug env overrides |
ESLint and Prettier are not used. OxLint owns all linting (including type-aware rules and custom plugin rules); Biome owns only formatting.
Custom rules you will hit
custom/color-linter: use design tokens (bg-primary,text-muted-foreground), not hard-coded colors. Seestorefront-next:sfnext-theming.custom/header-format: every TS/JS file needs the Apache 2.0 license header. Copy it from any existing source file.jsx-a11y/*recommended set at error, plusno-aria-hidden-on-focusable,anchor-ambiguous-text,no-redundant-roles(allowsrole="list"onul) andalt-textextended toDynamicImageandProductImage.no-restricted-imports: browser-only@salesforce/storefront-next-runtime/i18n/clientis blocked from server modules.- TypeScript only in
src/.
Fix the code rather than disabling. If a suppression is truly needed, use a scoped // oxlint-disable-next-line <rule> -- reason. --report-unused-disable-directives fails stale ones. Generated and vendored trees (SCAPI generated clients, src/components/ui/**, build output) are skipped by lint and format.
More: references/lint-and-budgets.md and docs/README-LINTING.md (skip the sections about repository internals that do not apply to your project).
Typical failures
| Symptom | Fix |
|---|---|
pnpm lint fails only at the end on formatting |
pnpm format |
| Warning count > 0 | Warnings are errors here; fix or justify with a scoped disable |
jsx-a11y/... error |
Fix markup; run pnpm lint:a11y while iterating |
Type errors about +types/... routes |
Run pnpm typecheck (it regenerates route types) |
pnpm lint:css cannot find stylesheet |
Run pnpm build first |
| Lighthouse/bundle budget exceeded after adding a feature | See the budget notes in the reference; look for eager imports before raising a limit |
Related Skills
storefront-next:sfnext-testing- unit, story and e2e tests (the test half of the checklist)storefront-next:sfnext-accessibility- fixing a11y lint and scan findingsstorefront-next:sfnext-performance- reducing bundle and page weightstorefront-next:sfnext-theming- design tokens behindcolor-linterstorefront-next:sfnext-deployment- build and push after the gates pass
Установить sfnext-quality-gates в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл sfnext-quality-gates?
Run and fix the Storefront Next quality gates before a PR or deploy: OxLint (type-aware, --max-warnings 0) plus Biome formatting, lint:a11y, lint:css, typecheck, the TypeScript-only check, bundle-size budgets, Lighthouse CI, and the pre-PR checklist. Use when pnpm lint, pnpm format:check, pnpm typecheck, pnpm bundlesize or pnpm lighthouse:ci fails, for custom/color-linter or custom/header-format errors, "unused Tailwind class" findings, oxlint-disable comments, "what should I run before opening a PR", or CI red on lint. Do not use for writing tests (use `storefront-next:sfnext-testing`), accessibility fixes themselves (use `storefront-next:sfnext-accessibility`), or runtime performance tuning (use `storefront-next:sfnext-performance`).
Как установить скилл sfnext-quality-gates?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sfnext-quality-gates запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic