Harness Intelligence Wiki
SpecsCLIScaffold Lint Config Baseline

Spec: Scaffold Lint Config Baseline

Spec: Scaffold Lint Config Baseline

User input

i want to refactor the layer around hooks and autoformat.

particularly i want to include lint rules as scaffolded baseline in our packs.

for now i have this collection of lint rules that we must put into react pack: https://react.dev/reference/eslint-plugin-react-hooks https://www.npmjs.com/package/eslint-plugin-react-you-might-not-need-an-effect

scaffolding should now make sure we either provide a full oxlint config if none or we update the existing config with said rules if theyre missing.

rules should be scoped into their package/app into the closes lint config

this should work with ruff too whenever we provide new rules in there too

yes agree

So the hook/refactor and config-scaffold refactor must land together.

also yes

i also now want to include ultracite as linting dependency. they provide already default lints and packs for languages and frameworks.

so our linting scaffold strategy should revolve around distributing ultracite presets + optional individual lints

their pack selectino looks good already, just make sure we include the might not need effect lint in the react pack

Context

punks scaffold setup already resolves pack-owned lint assets, but it only emits advisory specs and a starter Oxlint JSON file. That leaves follow-up agents to hand-merge rules, and the generated autoformat hook still forces root .oxlintrc.json with -c, which conflicts with nearest-config behavior.

Operators need scaffolded lint baselines to become runnable repo output. Ultracite should provide the default Oxlint baseline and framework presets. Pack-owned assets should then layer only the individual rules that are not covered by the chosen preset, such as the React unnecessary-effect rules, scoped to the owning package or app. The same asset model must be ready for Ruff rules later.

Non-Goals

  • Add Ruff rule assets in this delivery.
  • Replace non-Oxlint JavaScript lint stacks such as ESLint, Biome, or Prettier.
  • Rewrite broad package scripts, CI, or editor integration beyond scaffolded hook/config behavior.
  • Change pack selection semantics beyond existing React/Oxlint/Oxfmt/Python detection.

Acceptance Criteria

  • React pack output includes the Ultracite React Oxlint preset and the valid eslint-plugin-react-you-might-not-need-an-effect rule set.
  • Scaffold setup writes a complete Oxlint config when a selected lint asset applies to a workspace with no closest Oxlint config.
  • Scaffold setup patches the closest Oxlint config for the owning package/app when selected presets, lint rules, plugins, JS plugin aliases, settings, or required package dev dependencies are missing.
  • Existing configs keep unrelated rules and settings intact.
  • Required lint dependencies are added to the nearest owning package.json devDependencies when missing, including oxlint, ultracite, and overlay JS plugins.
  • The neutral hook no longer forces root Oxlint config and lets Oxlint resolve the nearest config for the edited file.
  • Generated lint metadata and handoff/docs describe applied config files, required dependencies, and remaining asset specs.
  • Tests cover new-config creation, existing-config merge, dependency insertion, invalid rule regression, and hook command behavior.

Constraints

  • Scope changes to apps/cli scaffold output and project docs.
  • Preserve existing user edits in unrelated backoffice/wiki files.
  • Keep packages/scaffold as schema/model-only unless a shared contract change is required.
  • Use official docs or upstream source for lint plugin rule names.
  • Keep generated config stable and deterministic.

Technical Notes

  • Oxlint nested config lookup is disabled when --config is passed, so the hook and scaffold config changes must land together.
  • Ruff config lookup also uses closest project config and does not merge parent config, so the asset model should represent tool-family placement even though this delivery only applies Oxlint assets.
  • eslint-plugin-react-you-might-not-need-an-effect@0.10.2 does not expose no-empty-effect; the existing catalog entry must be corrected.

Decision Log

DecisionRationale
Patch nearest package/app lint config, not only root configRules must live with the owning code surface and avoid repo-wide false positives.
Add missing dev dependencies during scaffoldGenerated lint config must be runnable immediately.
Deliver hook lookup and config scaffold changes togetherForcing root config would make nested package/app configs ineffective.
Leave Ruff asset authoring for laterThe current requested rules are React/Oxlint; Ruff support is a model constraint only.
Use Ultracite presets as the Oxlint baselineFramework/default rule ownership should stay with maintained Ultracite packs.

On this page