Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/branch-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
checkup:
name: 👮 Checkup
needs: dedupe
uses: GSTJ/magic/.github/workflows/ci.yml@main
uses: GSTJ/magic/.github/workflows/ci.yml@v1

# Kept out of the shared checkup job: only this one needs a database, and
# folding it in would spin up Postgres for typecheck/lint/format too. No
Expand Down
30 changes: 24 additions & 6 deletions apps/nextjs/oxlint.config.mts
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
import { extendConfig } from "magic-oxlint-config";
import next from "magic-oxlint-config/next";

/**
* A nested config replaces the root one for everything under `apps/nextjs`, so
* this file has to be complete on its own. Re-exporting the preset — rather
* than `defineConfig({ extends: [next] })` — is what makes it complete:
* `extends` still drops the extended config's `ignorePatterns` on oxlint
* 1.75.0, so the extends form needs them copied back by hand. The re-export
* loads the preset as *the* config and every field applies.
* this file has to be complete on its own. `extendConfig` flattens the preset
* and the additions below into one config, which is what makes it complete:
* oxlint's own `extends` still drops the extended config's `ignorePatterns` on
* 1.75.0 and needs them re-listed by hand.
*
* This is the only config in the repo that loads the `magic` jsPlugin.
* `magic/no-manual-classname` is a Tailwind rule and Tailwind stops at this
* app — the mobile app styles with styled-components and `packages/*` has no
* JSX at all, so loading the plugin there would cost startup time to lint
* nothing.
*/
export { default } from "magic-oxlint-config/next";
export default extendConfig(next, {
jsPlugins: [{ name: "magic", specifier: "magic-oxlint-plugin" }],

rules: {
// Class strings go through `cn` (src/lib/utils.ts, `twMerge(clsx(...))`)
// or a `cva` variant table. A hand-built one loses the conflict
// resolution: `p-2 ${active ? "p-4" : ""}` emits both paddings and leaves
// the winner to stylesheet order, where `cn` keeps the last one.
"magic/no-manual-classname": "error",
},
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"magic-codemods": "^1.1.0",
"magic-oxfmt-config": "^1.2.0",
"magic-oxlint-config": "^1.2.0",
"magic-oxlint-plugin": "^1.1.0",
"magic-tsconfig": "^1.2.0",
"oxfmt": "0.60.0",
"oxlint": "1.75.0",
Expand Down
16 changes: 16 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ minimumReleaseAgeExclude:
- magic-oxfmt-config@1.2.0
- magic-oxlint-config@1.2.0
- magic-tsconfig@1.2.0
- magic-oxlint-plugin@1.1.0

# pnpm 10+ does not run dependency install scripts unless they are listed here,
# and pnpm 11 makes an unanswered list a hard install failure. Every entry ran
Expand Down
Loading