chore(tooling): track magic by tag and ban hand-built className - #110
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two changes, both in the shared-tooling direction.
ci.yml@main->ci.yml@v1.github/workflows/branch-check.ymlcalled the reusable checkup workflow bybranch. That means an unreviewed merge in
GSTJ/magicreruns this repo's CIwith code nobody looked at.
@v1is a moving major tag: fixes still land onthe next run, but only once someone cuts a release.
v1currently points atv1.4.0.The call passes no
with:block, so there was no input signature toreconcile — every input on
ci.ymlis optional and defaults sensibly(
.nvmrcfor Node,packageManagerfor pnpm).magic/no-manual-classnameat errorEnabled in
apps/nextjs/oxlint.config.mts, which had to grow from a barere-export into an
extendConfigcall to carry thejsPluginsentry.It is on in that one config on purpose. The rule is about Tailwind class
strings;
apps/mobilestyles with styled-components andpackages/*has noJSX 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 firesby planting a
className={`p-2 ${active ? "p-4" : ""}`}and watching iterror, then removing it — a rule that reports nothing because it never loaded
looks identical to a clean repo.
The
minimumReleaseAgeExcludelinemagic-oxlint-plugin@1.1.0published today, and pnpm 11 refuses anythingunder 24h old on
--frozen-lockfile. pnpm wrote the exclude entry intopnpm-workspace.yamlitself during the first local install. It looks likelocal-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-lockfileclean from an emptynode_modulespnpm dedupe --checkcleanoxlint --report-unused-disable-directives: 0 diagnosticsoxfmt --check .: 464 files, all formattedpnpm typecheck: 5/5 packagesTests run on CI, where the PostGIS service container exists.
Claude-Session: https://claude.ai/code/session_01Fe92vvdc4R3F4BDBFoLcw1