Skip to content

chore(tooling): track magic by tag and ban hand-built className - #110

Merged
GSTJ merged 1 commit into
mainfrom
chore/magic-v1
Jul 27, 2026
Merged

chore(tooling): track magic by tag and ban hand-built className#110
GSTJ merged 1 commit into
mainfrom
chore/magic-v1

Conversation

@GSTJ

@GSTJ GSTJ commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Two changes, both in the shared-tooling direction.

ci.yml@main -> ci.yml@v1

.github/workflows/branch-check.yml called the reusable checkup workflow by
branch. That means an unreviewed merge in GSTJ/magic reruns this repo's CI
with code nobody looked at. @v1 is a moving major tag: fixes still land on
the next run, but only once someone cuts a release. v1 currently points at
v1.4.0.

The call passes no with: block, so there was no input signature to
reconcile — every input on ci.yml is optional and defaults sensibly
(.nvmrc for Node, packageManager for pnpm).

magic/no-manual-classname at error

Enabled in apps/nextjs/oxlint.config.mts, which had to grow from a bare
re-export into an extendConfig call to carry the jsPlugins entry.

It is on in that one config on purpose. The rule is about Tailwind class
strings; apps/mobile styles with styled-components and packages/* has no
JSX at all, so putting the plugin in the root config would pay the jsPlugin
startup cost to lint files that can never violate it.

Zero violations. Every class string in the app already goes through cn
(src/lib/utils.ts, twMerge(clsx(...))). Verified the rule actually fires
by planting a className={`p-2 ${active ? "p-4" : ""}`} and watching it
error, then removing it — a rule that reports nothing because it never loaded
looks identical to a clean repo.

The minimumReleaseAgeExclude line

magic-oxlint-plugin@1.1.0 published today, and pnpm 11 refuses anything
under 24h old on --frozen-lockfile. pnpm wrote the exclude entry into
pnpm-workspace.yaml itself during the first local install. It looks like
local-machine noise; it is the only reason CI can install. It comes back out
once the version ages past the window. No two-version dance was needed here
since the plugin is a new dependency, not a bump.

The other magic-* packages are already on current latest (configs 1.2.0,
codemods 1.1.0), so this PR bumps nothing.

Checks

  • pnpm install --frozen-lockfile clean from an empty node_modules
  • pnpm dedupe --check clean
  • oxlint --report-unused-disable-directives: 0 diagnostics
  • oxfmt --check .: 464 files, all formatted
  • pnpm typecheck: 5/5 packages

Tests run on CI, where the PostGIS service container exists.

Claude-Session: https://claude.ai/code/session_01Fe92vvdc4R3F4BDBFoLcw1

Point the shared checkup job at `GSTJ/magic/.github/workflows/ci.yml@v1`
instead of `@main`. `@main` reruns this repo's CI on whatever was merged
there five minutes ago; `@v1` is a moving major tag, so fixes still arrive
on the next run but an unreviewed merge cannot. The call passes no inputs,
so there is no signature to reconcile — every `ci.yml` input is optional.

Turn on `magic/no-manual-classname` at error, in apps/nextjs only. The
rule is a Tailwind rule and Tailwind stops at that app: mobile styles with
styled-components and `packages/*` ships no JSX, so loading the jsPlugin
there would cost startup time to lint nothing. Zero violations today —
every class string in the app already goes through `cn` from
`src/lib/utils.ts` — which makes this a ratchet rather than a cleanup.

Adding the plugin needed `magic-oxlint-plugin@1.1.0` in the
`minimumReleaseAgeExclude` list. pnpm 11 refuses a package published less
than 24h ago and 1.1.0 went out today; pnpm writes the entry itself on the
first local install, and it reads like machine noise but is the only thing
that lets `--frozen-lockfile` resolve on CI. It comes back out once the
version ages past the window.

The other `magic-*` deps are already on the current latest (1.2.0 for the
three configs, 1.1.0 for the codemods), so nothing to bump there.

Claude-Session: https://claude.ai/code/session_01Fe92vvdc4R3F4BDBFoLcw1
@GSTJ
GSTJ merged commit 84225fa into main Jul 27, 2026
3 checks passed
@GSTJ
GSTJ deleted the chore/magic-v1 branch July 27, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant