---
name: strongtie-style-consistency
description: "Set up and run code-style linting for Simpson Strong-Tie projects using Ultracite and the @strongtie linting packages. Use when: (1) Setting up linting in a project, (2) Running lint checks, (3) Fixing lint errors."
---

# Style Consistency Skill

Get a project onto the shared Simpson Strong-Tie lint/format baseline — ESLint, Prettier, and Stylelint driven by Ultracite and the `@strongtie` config packages — and then run checks and fixes the way that actually works in this environment.

## When to use this skill

Reach for it when you are wiring linting into a project for the first time, running a check before a commit, or clearing lint errors. The through-line is that you are enforcing the *shared* Strongtie style, not a one-off local ruleset — the value is that every consuming project lands on the same rules the design system itself uses.

## When NOT to use this skill

If you are authoring a component, test, story, or MDX page inside `@strongtie/design-system`, the relevant conventions live in `strongtie-component`, `strongtie-test`, and `strongtie-docs`; lint is a step in those flows, not the subject. If a project deliberately runs a different, non-Strongtie ruleset, do not force this baseline onto it — the whole point of the shared config is that it moves as one, and a project that has opted out is not part of that set. And this skill is about *style enforcement*, not about the runtime behavior of any `@strongtie` package.

## Let the @strongtie packages own the versions

**Install the three `@strongtie` config packages and defer every version decision to their declared ranges — do not pin a matrix of plugin versions in this skill.** The real source of truth is `@strongtie/eslint`, `@strongtie/prettier`, and `@strongtie/stylelint`: each declares the peer and dependency ranges it actually supports, and those ranges move when the packages move. A skill that hardcodes `ultracite@^7.2.4`, `stylelint@^17`, and twenty plugin pins becomes a second, competing source of truth that silently drifts out from under the packages it is supposed to mirror — the moment a package bumps a peer, the skill is wrong and nobody notices. So install `@strongtie/eslint`, `@strongtie/prettier`, and `@strongtie/stylelint`, add Ultracite and the linters, and let `npm` resolve the rest against the packages' own ranges.

**For the authoritative, maintained install steps — the exact peer-dependency list and the ignore files — follow the live docs rather than a copy here.** Two docs are kept current with the packages and will not drift the way an inline list would: `packages/eslint/README.md` for the package's own usage, and `apps/docs/content/docs/getting-started/eslint-setup.mdx` (published at https://design.strongtie.io/getting-started/eslint-setup) for the full project setup. Point people there for the long peer list; reproducing it inline is exactly the drift trap above.

```bash
# Core toolchain — ranges resolved against the @strongtie packages' peers
npm install -D ultracite eslint@^10 prettier@^3 stylelint@^17

# The @strongtie config packages — the version source of truth
npm install -D @strongtie/eslint @strongtie/prettier @strongtie/stylelint
```

**ESLint 10 is the current baseline — `@strongtie/eslint` supports it, so do not pin to the older major.** The package declares `"eslint": "^9.0.0 || ^10.0.0"` (`packages/eslint/package.json`), and the repo runs ESLint 10 everywhere (root `package.json`, `apps/docs`, and `packages/design-system` are all on `^10`). Defer to that peer range rather than asserting a fixed major, because a hardcoded version claim goes stale the instant the packages move — and an earlier version of this skill was not merely stale but *inverted*, steering projects onto the older major against a config that already supported the newer one. The earlier `eslint-plugin-react` incompatibility with the newer ESLint major is resolved in current plugin releases; if you hit it, update plugins forward, do not downgrade ESLint.

## Configuration files

These three files are short, stable, and load-bearing, so they belong inline. Create them in the project root; the Azure Artifacts `.npmrc` and the ignore files are covered in the live setup doc above.

**eslint.config.mjs:**

```javascript
import base from "@strongtie/eslint/base"
import react from "@strongtie/eslint/react"
import { defineConfig } from "eslint/config"

export default defineConfig([
  {
    ignores: [
      "**/dist/", "**/build/", "**/.next/", "**/.turbo/",
      "**/node_modules/", "**/*.config.ts", "**/*.config.mjs",
      "**/*.d.ts", "**/*.json", "components/ui/**/*",
    ],
  },
  ...base(),
  ...react,
])
```

**prettier.config.mjs:**

```javascript
export { default } from "@strongtie/prettier"
```

**stylelint.config.mjs:**

```javascript
export { default } from "@strongtie/stylelint"
```

## Running checks and fixes

**Diagnose with `ultracite doctor`, then run the linters by their own binaries — do not route check-and-fix through the Ultracite command wrappers.** In this environment the Ultracite check and fix subcommands hang non-interactively: they wait on a prompt that never arrives in a CI job or an agent session, so a command that looks like it is working is actually stalled forever. That is the reason the direct-binary path is the reliable one, not a stylistic preference — `ultracite doctor` still earns its place because it validates that the config is wired correctly without running a lint pass, and after that you invoke `eslint`, `stylelint`, and `prettier` directly. If you are in a genuinely interactive shell the Ultracite wrappers can work, but never assume that; the direct binaries behave identically in every context.

```bash
# Diagnose configuration (safe, does not hang)
npx ultracite doctor

# Check (no changes)
npx eslint .
npx stylelint "**/*.css"
npx prettier --check .

# Fix
npx eslint --fix .
npx stylelint "**/*.css" --fix
npx prettier --write .

# Scope to a single file when iterating
npx eslint src/components/button.tsx
npx eslint --fix src/components/button.tsx
```

## What the shared config enforces

The rules themselves are documented and maintained in `packages/eslint/README.md` — read it there rather than trusting a summary that can drift. The shape worth knowing up front: a custom `@strongtie/no-static-inline-style` rule (use Tailwind or CSS modules, not static inline styles), several strict TypeScript rules relaxed for practical React work, React rules tuned for React 19 / the Compiler, and `no-console` as a warning so development logging is allowed but visible.

## Reference

- Package usage and full rule list: `packages/eslint/README.md`
- Full project setup (peer deps, ignore files, monorepo): `apps/docs/content/docs/getting-started/eslint-setup.mdx` — https://design.strongtie.io/getting-started/eslint-setup
- Ultracite docs: https://www.ultracite.ai/
