refactor: Add oxlint base configuration and integrate with ESLint via eslint-plugin-oxlint#832
Conversation
… eslint-plugin-oxlint
Deploying baseplate-storybook with
|
| Latest commit: |
47fe3c0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5e5ba39b.baseplate-storybook.pages.dev |
| Branch Preview URL: | https://kingston-improve-lint-and-bu.baseplate-storybook.pages.dev |
🦋 Changeset detectedLatest commit: 637aea8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis pull request introduces oxlint linting and oxfmt formatting tools across the monorepo. It adds oxlint configuration files to all packages, updates package.json scripts to run oxlint before eslint, replaces the pre-commit hook, and includes supporting changes for error handling, test assertions, type imports, and documentation updates. Changes
Sequence Diagram(s)sequenceDiagram
participant User as Developer
participant Pre as Pre-commit Hook
participant Lint as pnpm lint:staged
participant Oxlint as Oxlint
participant ESLint as ESLint
participant Git as Git
User->>Git: Stage changes
User->>Git: Commit
Git->>Pre: Trigger pre-commit
Pre->>Lint: Execute pnpm lint:staged
Lint->>Oxlint: Run oxlint --fix
Oxlint-->>Lint: Fixed code issues
Lint->>ESLint: Run eslint
ESLint-->>Lint: Linting results
Lint-->>Pre: Formatting/linting complete
Pre->>Git: Allow/block commit
Git-->>User: Commit result
sequenceDiagram
participant User as Developer
participant Check as pnpm check
participant Affected as Affected Packages
participant CheckFull as pnpm check:full
participant All as All Packages
participant Knip as Knip
participant Meta as Metadata Sync
User->>Check: Run during development
Check->>Affected: oxfmt:fix → oxlint:fix → lint → typecheck → test
Affected-->>Check: Results on affected code
Check-->>User: Feedback (fast)
User->>CheckFull: Run before task completion
CheckFull->>All: oxfmt:fix → oxlint:fix → lint → typecheck → test
All-->>CheckFull: Results on all packages
CheckFull->>Knip: Check unused code
Knip-->>CheckFull: Results
CheckFull->>Meta: Sync metadata
Meta-->>CheckFull: Complete
CheckFull-->>User: Final validation
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Actionable comments posted: 9
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/ui-components/src/hooks/use-event-callback.ts (1)
22-29:⚠️ Potential issue | 🔴 CriticalCritical bug: Callback captures stale function reference.
The
currentvariable is destructured outside the inner arrow function (line 23), so it captures the value ofref.currentat memoization time. SinceuseMemohas an empty dependency array, the returned callback will always invoke the initial function, ignoring subsequent updates from theuseEffect.The fix is to read
ref.currentinside the returned callback:🐛 Proposed fix
return useMemo(() => { - const { current } = ref; - if (!current) { - return; - } - // eslint-disable-next-line `@typescript-eslint/no-unsafe-return` -- safe to return the function - return (...args) => current(...args); + // eslint-disable-next-line `@typescript-eslint/no-unsafe-return` -- safe to return the function + return (...args) => ref.current?.(...args); }, []);If you need to preserve the behavior of returning
undefinedwhenfnis initially undefined (rather than a no-op function), an alternative approach:Alternative fix preserving undefined return
return useMemo(() => { - const { current } = ref; - if (!current) { + if (!ref.current) { return; } // eslint-disable-next-line `@typescript-eslint/no-unsafe-return` -- safe to return the function - return (...args) => current(...args); + return (...args) => ref.current!(...args); }, []);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/ui-components/src/hooks/use-event-callback.ts` around lines 22 - 29, The returned callback captures a stale reference because ref.current is destructured into current outside the inner function; update use-event-callback's useMemo so the returned function reads ref.current inside its body (e.g., return (...args) => { const fn = ref.current; if (!fn) return; return fn(...args); }) so subsequent updates to ref.current are honored; keep the memo dependencies the same to preserve return-undefined-on-initial-undefined behavior if desired.
🧹 Nitpick comments (6)
packages/sync/src/utils/create-generator.unit.test.ts (1)
64-66: Use regex matching instead of exact string for Zod error message assertions.Lines 64–66 assert a full literal message string. Zod error messages can vary across versions (e.g., v3 uses "Expected string, received number" with uppercase; v4 prefixes "Invalid input: "). Use a case-insensitive regex to match the stable part.
Proposed change
- expect(() => generator({ value: 123 as unknown as string })).toThrow( - 'expected string, received number', - ); + expect(() => generator({ value: 123 as unknown as string })).toThrow( + /expected string, received number/i, + );🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/sync/src/utils/create-generator.unit.test.ts` around lines 64 - 66, Update the failing assertion in the create-generator.unit.test to use a case-insensitive regex instead of an exact string: change the expect for generator({ value: 123 as unknown as string }) to toThrow matching a regex (e.g., /expected string, received number/i or allow optional "invalid input: " prefix via /(?:invalid input:\s*)?expected string, received number/i) so it tolerates Zod v3/v4 message differences; locate the assertion around the generator(...) call and replace the literal string with the regex.packages/tools/eslint-configs/typescript.js (1)
48-49: Consider removing redundantoxlint.config.tshandling.
oxlint.config.tsis added toallowDefaultProjectand also ignored globally. Keeping only one approach would reduce config ambiguity.♻️ Optional cleanup
const defaultProjectFiles = [ 'vitest.config.ts', - 'oxlint.config.ts', ...(options.extraDefaultProjectFiles ?? []), ];Also applies to: 320-320
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/tools/eslint-configs/typescript.js` around lines 48 - 49, Remove the redundant handling of 'oxlint.config.ts' by choosing a single strategy: either stop injecting 'oxlint.config.ts' into the default projects array (the literal entry in the array alongside ...(options.extraDefaultProjectFiles ?? [])) or remove it from the global ignore configuration where it's currently excluded; update the code around the array that currently contains 'oxlint.config.ts' and ...(options.extraDefaultProjectFiles ?? []) accordingly and ensure the project's allowDefaultProject/ignore settings remain consistent (modify the entry near the array or the global ignore list, and remove the duplicate reference)..oxfmtrc.json (1)
11-20: The instrumentation exception is only documented in comments, not configured.The comment on line 10 claims special handling for instrumentation imports, but the
groupsconfiguration has no separate instrumentation bucket—side_effectremains a single bucket. This misleading comment also appears inpackages/tools/eslint-configs/typescript.jsandpackages/core-generators/src/generators/node/eslint/templates/eslint.config.js.Currently, instrumentation imports are implicitly protected only because
examples/is inignorePatterns. For clarity and robustness, either remove the misleading comment or implement actual instrumentation handling by adding a separate group beforeside_effect.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.oxfmtrc.json around lines 11 - 20, The comment claiming special handling for instrumentation imports is misleading because the "groups" array lacks a separate instrumentation bucket; add an explicit instrumentation group immediately before the "side_effect" entry in the "groups" config (e.g., insert "instrumentation" or a pair like ["value-instrumentation","type-instrumentation"] depending on how other groups are defined) and mirror this change in the corresponding ESLint configs (the templates that reference this behavior) so instrumentation imports are actually segregated, or alternatively remove the misleading comment if you prefer not to implement the bucket.scripts/format-and-lint.ts (3)
198-202: Same ordering concern: ESLint runs before Prettier.For example files, ESLint's
--fixruns before Prettier. This is the reverse of the typical workflow (format first, then lint). ESLint autofix may introduce code that Prettier would reformat, making the hook non-idempotent.♻️ Proposed fix
- if (deps.eslint) await runEslint(files, pkgDir); - if (deps.prettier) { await Promise.all(files.map((f) => runPrettier(f))); } + + if (deps.eslint) await runEslint(files, pkgDir);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/format-and-lint.ts` around lines 198 - 202, The current ordering runs ESLint (runEslint) before Prettier (runPrettier), which makes fixes non-idempotent; change the control flow so that when both deps.prettier and deps.eslint are true you run Prettier first (e.g., await Promise.all(files.map(f => runPrettier(f)))) and only after that call await runEslint(files, pkgDir); update the block containing deps.prettier/deps.eslint to reflect this swapped order using the existing runPrettier and runEslint symbols.
157-164: Consider reversing the order: format before lint.The current order runs
oxlint --fixbeforeoxfmt. Typically, formatters should run first (to fix spacing/formatting), followed by linters (to apply semantic fixes). Otherwise,oxlint --fixmay introduce formatting thatoxfmtthen changes, potentially creating a non-idempotent workflow where re-running produces different output.♻️ Proposed fix
// Process monorepo files: run oxlint then oxfmt from root. if (monorepoFiles.length > 0) { console.info( - `\nProcessing ${monorepoFiles.length} monorepo file(s) with oxlint + oxfmt...`, + `\nProcessing ${monorepoFiles.length} monorepo file(s) with oxfmt + oxlint...`, ); - await runOxlint(monorepoFiles); await runOxfmt(monorepoFiles); + await runOxlint(monorepoFiles); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/format-and-lint.ts` around lines 157 - 164, The current sequence runs runOxlint(monorepoFiles) before runOxfmt(monorepoFiles), which can make fixes non-idempotent; swap the calls so formatting runs first: call runOxfmt(monorepoFiles) before runOxlint(monorepoFiles) in the monorepoFiles handling block to ensure oxfmt normalizes formatting prior to oxlint (including oxlint --fix) applying semantic fixes.
109-131: Error handling silently continues on failure.Both
runOxfmtandrunOxlintcatch errors and log them but don't propagate failures. The script will exit with code 0 even if these tools fail, potentially allowing badly formatted or linted code to be committed.If this is intentional (to avoid blocking commits), consider documenting this behavior. Otherwise, track failures and exit with a non-zero code at the end.
♻️ Proposed approach to track failures
+let hasFailures = false; + async function runOxfmt(filePaths: string[]): Promise<void> { console.info(`Running oxfmt on ${filePaths.length} file(s)...`); try { await execFilePromise('npx', ['oxfmt', ...filePaths], { cwd: ROOT_DIR }); console.info(`✅ oxfmt completed for ${filePaths.length} file(s).`); } catch (error) { console.error('❌ oxfmt failed.'); console.error(error instanceof Error ? error.message : String(error)); + hasFailures = true; } } async function runOxlint(filePaths: string[]): Promise<void> { console.info(`Running oxlint on ${filePaths.length} file(s)...`); try { await execFilePromise('npx', ['oxlint', '--fix', ...filePaths], { cwd: ROOT_DIR, }); console.info(`✅ oxlint completed for ${filePaths.length} file(s).`); } catch (error) { console.error('❌ oxlint failed.'); console.error(error instanceof Error ? error.message : String(error)); + hasFailures = true; } }Then at the end of the script:
console.info(`\nFormatting hook finished.`); if (hasFailures) process.exit(1);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/format-and-lint.ts` around lines 109 - 131, The runOxfmt and runOxlint functions currently swallow errors by logging them and continuing; change them to record failures and cause a non‑zero exit: add a top‑level boolean (e.g., hasFailures) initialized false, set hasFailures = true inside each catch in runOxfmt and runOxlint (referencing those function names), and at the end of the script check if (hasFailures) process.exit(1); alternatively you can rethrow the error from the catch to let the caller fail, but ensure one of these approaches is implemented so formatting/lint failures are reflected in the process exit code.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.husky/pre-commit:
- Line 1: Update the husky pre-commit hook to run both linting and typechecking
by chaining the existing "pnpm lint:staged" command with the project's typecheck
script; specifically modify the command in the .husky/pre-commit file so it
invokes "pnpm lint:staged" followed by "pnpm typecheck" (e.g., using &&) to
ensure both linting and TypeScript type validation run before commits.
In @.oxfmtrc.json:
- Line 10: The .oxfmtrc.json contains an inline JavaScript-style comment ("// We
use the default groups but ensure we place the side-effect imports last except
for instrumentation") which invalidates the JSON; remove that comment text
(delete the "// ..." line) so the file is valid JSON, or move the explanatory
note into documentation/README if you need to preserve it; ensure the resulting
.oxfmtrc.json parses as strict JSON (no // or /* */ comments).
In `@knip.config.js`:
- Around line 6-9: The knip config currently ignores only the root-level
oxlint.config.ts under the '.' workspace; update the configuration to also
ignore all per-package/plugin oxlint.config.ts files by adding
"oxlint.config.ts" to the global ignore array (the top-level ignore list) or by
adding "oxlint.config.ts" to each workspace's ignore field (e.g., in the
workspace objects that define entry: ['packages/*/...'] or 'plugins/*/...') so
Knip no longer reports the 22 per-package/plugin oxlint.config.ts files as
unused.
In `@packages/project-builder-server/src/dev-server/mcp/fastify.ts`:
- Line 49: Restore the removed ESLint suppression by adding the eslint-disable
comment for unicorn/prefer-add-event-listener back next to the existing oxlint
directive immediately above the property assignment that triggers the rule (the
comment that was on Line 49); specifically add "eslint-disable-next-line
unicorn/prefer-add-event-listener" alongside the existing oxlint comment so both
linters are satisfied.
In `@packages/tools/eslint-configs/oxlint.js`:
- Around line 4-7: Replace the relative import of oxlint.config.base.ts with the
published package export and update the TS suppression: import oxlintConfig from
'@baseplate-dev/tools/oxlint-config-base' instead of '../oxlint.config.base.ts',
then keep using oxlint.buildFromOxlintConfig(oxlintConfig) to construct
oxlintEslintConfigs and change the comment above it from // `@ts-ignore` to //
`@ts-expect-error` so the type suppression will fail loudly if the typing is fixed
in the future.
In `@packages/tools/eslint-configs/react.js`:
- Around line 75-83: The current manual react-hooks config replaces the plugin
preset and drops many React Compiler rules; instead restore the plugin preset by
using reactHooksPlugin.configs.flat['recommended-latest'] and override only the
exhaustive-deps rule to 'off' (keep the plugin reference reactHooksPlugin and
ensure 'react-hooks/rules-of-hooks' remains enabled by inheriting the preset,
e.g. spread the preset and set rules: { 'react-hooks/exhaustive-deps': 'off' }).
In `@packages/tools/eslint-configs/typescript.js`:
- Around line 294-295: The new lint rule 'vitest/require-to-throw-message' will
fail existing tests that call .toThrow(), .not.toThrow(), or .rejects.toThrow()
without an expected message; either update each failing test (e.g., in
packages/utils/src/events/typed-event-emitter.unit.test.ts,
packages/utils/src/arrays/assert-no-duplicates.unit.test.ts,
examples/todo-with-better-auth/.../mime.unit.test.ts,
packages/sync/src/templates,
packages/project-builder-lib/src/migrations/migrations.unit.test.ts,
packages/core-generators/.../extract-ts-template-variables-simple.unit.test.ts)
to provide an explicit message or regex (use .toThrow('message') or
.toThrow(/pattern/) or assert the Error constructor/type), or temporarily
disable the rule by changing 'vitest/require-to-throw-message' from 'error' to
'off' in the eslint config (typescript.js) until all tests are updated; pick one
approach and apply it consistently.
In `@packages/tools/oxlint.config.base.ts`:
- Around line 23-27: The rule key is inconsistent: replace the incorrect
'no-unassigned-import' rule entry with the canonical
'import/no-unassigned-import' so the allowlist object is applied to the same
rule referenced elsewhere; update the rule name where it's defined (the array
with the allow: ['**/*.css', '**/vitest']) to 'import/no-unassigned-import' and
ensure any overrides that reference 'import/no-unassigned-import' remain
consistent.
In `@packages/tools/package.json`:
- Line 32: The package export "./oxlint-config-base" references
"./oxlint.config.base.ts" but that file is not listed in the package "files"
array, so add "oxlint.config.base.ts" (matching exact filename and extension) to
the "files" array in packages/tools/package.json; also ensure any other related
entries (the other files array ranges mentioned around lines 44-51) include the
same file so the export is bundled when publishing.
---
Outside diff comments:
In `@packages/ui-components/src/hooks/use-event-callback.ts`:
- Around line 22-29: The returned callback captures a stale reference because
ref.current is destructured into current outside the inner function; update
use-event-callback's useMemo so the returned function reads ref.current inside
its body (e.g., return (...args) => { const fn = ref.current; if (!fn) return;
return fn(...args); }) so subsequent updates to ref.current are honored; keep
the memo dependencies the same to preserve return-undefined-on-initial-undefined
behavior if desired.
---
Nitpick comments:
In @.oxfmtrc.json:
- Around line 11-20: The comment claiming special handling for instrumentation
imports is misleading because the "groups" array lacks a separate
instrumentation bucket; add an explicit instrumentation group immediately before
the "side_effect" entry in the "groups" config (e.g., insert "instrumentation"
or a pair like ["value-instrumentation","type-instrumentation"] depending on how
other groups are defined) and mirror this change in the corresponding ESLint
configs (the templates that reference this behavior) so instrumentation imports
are actually segregated, or alternatively remove the misleading comment if you
prefer not to implement the bucket.
In `@packages/sync/src/utils/create-generator.unit.test.ts`:
- Around line 64-66: Update the failing assertion in the
create-generator.unit.test to use a case-insensitive regex instead of an exact
string: change the expect for generator({ value: 123 as unknown as string }) to
toThrow matching a regex (e.g., /expected string, received number/i or allow
optional "invalid input: " prefix via /(?:invalid input:\s*)?expected string,
received number/i) so it tolerates Zod v3/v4 message differences; locate the
assertion around the generator(...) call and replace the literal string with the
regex.
In `@packages/tools/eslint-configs/typescript.js`:
- Around line 48-49: Remove the redundant handling of 'oxlint.config.ts' by
choosing a single strategy: either stop injecting 'oxlint.config.ts' into the
default projects array (the literal entry in the array alongside
...(options.extraDefaultProjectFiles ?? [])) or remove it from the global ignore
configuration where it's currently excluded; update the code around the array
that currently contains 'oxlint.config.ts' and
...(options.extraDefaultProjectFiles ?? []) accordingly and ensure the project's
allowDefaultProject/ignore settings remain consistent (modify the entry near the
array or the global ignore list, and remove the duplicate reference).
In `@scripts/format-and-lint.ts`:
- Around line 198-202: The current ordering runs ESLint (runEslint) before
Prettier (runPrettier), which makes fixes non-idempotent; change the control
flow so that when both deps.prettier and deps.eslint are true you run Prettier
first (e.g., await Promise.all(files.map(f => runPrettier(f)))) and only after
that call await runEslint(files, pkgDir); update the block containing
deps.prettier/deps.eslint to reflect this swapped order using the existing
runPrettier and runEslint symbols.
- Around line 157-164: The current sequence runs runOxlint(monorepoFiles) before
runOxfmt(monorepoFiles), which can make fixes non-idempotent; swap the calls so
formatting runs first: call runOxfmt(monorepoFiles) before
runOxlint(monorepoFiles) in the monorepoFiles handling block to ensure oxfmt
normalizes formatting prior to oxlint (including oxlint --fix) applying semantic
fixes.
- Around line 109-131: The runOxfmt and runOxlint functions currently swallow
errors by logging them and continuing; change them to record failures and cause
a non‑zero exit: add a top‑level boolean (e.g., hasFailures) initialized false,
set hasFailures = true inside each catch in runOxfmt and runOxlint (referencing
those function names), and at the end of the script check if (hasFailures)
process.exit(1); alternatively you can rethrow the error from the catch to let
the caller fail, but ensure one of these approaches is implemented so
formatting/lint failures are reflected in the process exit code.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d4bd9967-df29-4555-83d3-3f03e637dc27
⛔ Files ignored due to path filters (9)
examples/blog-with-auth/apps/admin/baseplate/generated/package.jsonis excluded by!**/generated/**,!**/generated/**examples/blog-with-auth/apps/backend/baseplate/generated/package.jsonis excluded by!**/generated/**,!**/generated/**examples/blog-with-auth/libs/transactional/baseplate/generated/package.jsonis excluded by!**/generated/**,!**/generated/**examples/blog-with-auth/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlexamples/todo-with-better-auth/apps/admin/baseplate/generated/package.jsonis excluded by!**/generated/**,!**/generated/**examples/todo-with-better-auth/apps/backend/baseplate/generated/package.jsonis excluded by!**/generated/**,!**/generated/**examples/todo-with-better-auth/apps/web/baseplate/generated/package.jsonis excluded by!**/generated/**,!**/generated/**examples/todo-with-better-auth/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (108)
.agents/dev-commands.md.changeset/improve-lint-build-performance.md.claude/settings.json.devcontainer/conf/starship.toml.husky/post-checkout.husky/pre-commit.oxfmtrc.jsonAGENTS.mdexamples/blog-with-auth/apps/admin/package.jsonexamples/blog-with-auth/apps/backend/package.jsonexamples/blog-with-auth/libs/transactional/package.jsonexamples/todo-with-better-auth/apps/admin/package.jsonexamples/todo-with-better-auth/apps/backend/package.jsonexamples/todo-with-better-auth/apps/web/package.jsonknip.config.jsoxlint.config.tspackage.jsonpackages/code-morph/oxlint.config.tspackages/code-morph/package.jsonpackages/code-morph/src/types.tspackages/core-generators/eslint.config.jspackages/core-generators/oxlint.config.tspackages/core-generators/package.jsonpackages/core-generators/src/constants/core-packages.tspackages/core-generators/src/renderers/extractor/plugins/template-renderers/renderers-file.tspackages/core-generators/src/renderers/typescript/imports/ts-morph-operations.unit.test.tspackages/core-generators/src/renderers/typescript/templates/creators.tspackages/core-generators/src/renderers/typescript/templates/types.tspackages/core-generators/src/test-helpers/matchers.unit.test.tspackages/create-project/oxlint.config.tspackages/create-project/package.jsonpackages/fastify-generators/eslint.config.jspackages/fastify-generators/oxlint.config.tspackages/fastify-generators/package.jsonpackages/project-builder-cli/oxlint.config.tspackages/project-builder-cli/package.jsonpackages/project-builder-common/package.jsonpackages/project-builder-dev/oxlint.config.tspackages/project-builder-dev/package.jsonpackages/project-builder-lib/oxlint.config.tspackages/project-builder-lib/package.jsonpackages/project-builder-lib/src/plugins/migrations/run-migrations.tspackages/project-builder-lib/src/web/components/definition-diff-alert.tsxpackages/project-builder-server/oxlint.config.tspackages/project-builder-server/package.jsonpackages/project-builder-server/src/actions/definition/draft-lifecycle.int.test.tspackages/project-builder-server/src/compiler/web/web-compiler.tspackages/project-builder-server/src/dev-server/mcp/fastify.tspackages/project-builder-server/src/templates/utils/resolve-generator.tspackages/project-builder-test/oxlint.config.tspackages/project-builder-test/package.jsonpackages/project-builder-web/oxlint.config.tspackages/project-builder-web/package.jsonpackages/react-generators/eslint.config.jspackages/react-generators/oxlint.config.tspackages/react-generators/package.jsonpackages/sync/oxlint.config.tspackages/sync/package.jsonpackages/sync/src/output/string-merge-algorithms/git-merge-driver.tspackages/sync/src/output/string-merge-algorithms/simple-diff.unit.test.tspackages/sync/src/templates/extractor/utils/index-template-configs.unit.test.tspackages/sync/src/templates/metadata/delete-metadata.unit.test.tspackages/sync/src/templates/metadata/read-template-info-files.unit.test.tspackages/sync/src/utils/create-generator.unit.test.tspackages/tools/eslint-configs/oxlint.jspackages/tools/eslint-configs/react.jspackages/tools/eslint-configs/typescript.jspackages/tools/eslint.config.node.jspackages/tools/eslint.config.react.jspackages/tools/oxlint.config.base.tspackages/tools/oxlint.config.tspackages/tools/package.jsonpackages/tools/tsconfig.jsonpackages/ui-components/oxlint.config.tspackages/ui-components/package.jsonpackages/ui-components/src/components/ui/date-time-picker-field/date-time-picker-field.stories.tsxpackages/ui-components/src/hooks/use-event-callback.tspackages/utils/oxlint.config.tspackages/utils/package.jsonpackages/utils/src/events/typed-event-emitter.tspackages/utils/src/fs/handle-not-found-error.unit.test.tspackages/utils/src/toposort/toposort.unit.test.tsplugins/plugin-auth/eslint.config.jsplugins/plugin-auth/oxlint.config.tsplugins/plugin-auth/package.jsonplugins/plugin-email/eslint.config.jsplugins/plugin-email/oxlint.config.tsplugins/plugin-email/package.jsonplugins/plugin-observability/eslint.config.jsplugins/plugin-observability/oxlint.config.tsplugins/plugin-observability/package.jsonplugins/plugin-payments/eslint.config.jsplugins/plugin-payments/oxlint.config.tsplugins/plugin-payments/package.jsonplugins/plugin-queue/eslint.config.jsplugins/plugin-queue/oxlint.config.tsplugins/plugin-queue/package.jsonplugins/plugin-rate-limit/eslint.config.jsplugins/plugin-rate-limit/oxlint.config.tsplugins/plugin-rate-limit/package.jsonplugins/plugin-storage/eslint.config.jsplugins/plugin-storage/oxlint.config.tsplugins/plugin-storage/package.jsonpnpm-workspace.yamlscripts/check-changesets.tsscripts/format-and-lint.tstsconfig.scripts.jsonturbo.json
💤 Files with no reviewable changes (2)
- packages/utils/src/fs/handle-not-found-error.unit.test.ts
- .husky/post-checkout
| @@ -0,0 +1 @@ | |||
| pnpm lint:staged | |||
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify that lint:staged script is defined in root package.json
echo "Checking for lint:staged script in root package.json..."
jq -r '.scripts["lint:staged"] // "NOT FOUND"' package.jsonRepository: halfdomelabs/baseplate
Length of output: 133
Add typecheck to pre-commit hook for complete pre-commit validation.
The lint:staged script exists and is correctly referenced. However, based on the project learnings that "pnpm lint --fix and pnpm typecheck before committing code", consider enhancing the hook to also run typecheck:
pnpm lint:staged && pnpm typecheck
This ensures both linting and type validation pass before commits are allowed.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.husky/pre-commit at line 1, Update the husky pre-commit hook to run both
linting and typechecking by chaining the existing "pnpm lint:staged" command
with the project's typecheck script; specifically modify the command in the
.husky/pre-commit file so it invokes "pnpm lint:staged" followed by "pnpm
typecheck" (e.g., using &&) to ensure both linting and TypeScript type
validation run before commits.
| "printWidth": 80, | ||
| "sortImports": { | ||
| "internalPattern": ["@src/", "#"], | ||
| // We use the default groups but ensure we place the side-effect imports last except for instrumentation |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python - <<'PY'
import json
from pathlib import Path
with Path(".oxfmtrc.json").open() as fh:
json.load(fh)
print("valid json")
PYRepository: halfdomelabs/baseplate
Length of output: 830
Remove the inline comment from this JSON file.
.json format does not support // comments, causing a parse error at line 10. The configuration file is currently invalid and will fail to load.
Proposed fix
"sortImports": {
"internalPattern": ["@src/", "#"],
- // We use the default groups but ensure we place the side-effect imports last except for instrumentation
"groups": [
"type-builtin",
["value-builtin", "value-external"],📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // We use the default groups but ensure we place the side-effect imports last except for instrumentation | |
| "sortImports": { | |
| "internalPattern": ["@src/", "#"], | |
| "groups": [ | |
| "type-builtin", | |
| ["value-builtin", "value-external"], |
🧰 Tools
🪛 Biome (2.4.6)
[error] 10-10: Expected a property but instead found '// We use the default groups but ensure we place the side-effect imports last except for instrumentation'.
(parse)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.oxfmtrc.json at line 10, The .oxfmtrc.json contains an inline
JavaScript-style comment ("// We use the default groups but ensure we place the
side-effect imports last except for instrumentation") which invalidates the
JSON; remove that comment text (delete the "// ..." line) so the file is valid
JSON, or move the explanatory note into documentation/README if you need to
preserve it; ensure the resulting .oxfmtrc.json parses as strict JSON (no // or
/* */ comments).
| '.': { | ||
| entry: ['.workspace-meta/config.ts', 'scripts/**/*.{js,ts}'], | ||
| ignore: ['oxlint.config.ts'], | ||
| }, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Find all oxlint.config.ts files in the repo to verify coverage
echo "Finding all oxlint.config.ts files..."
fd -t f 'oxlint.config.ts'
echo ""
echo "Checking if any are outside root level..."
fd -t f 'oxlint.config.ts' | grep -v '^oxlint.config.ts$' || echo "All configs are at root level"Repository: halfdomelabs/baseplate
Length of output: 1975
🏁 Script executed:
cat -n knip.config.js | head -200Repository: halfdomelabs/baseplate
Length of output: 6179
Add oxlint.config.ts to global ignore array or per-workspace ignore patterns.
The root workspace's ignore pattern covers only the root-level oxlint.config.ts. However, there are 22 oxlint.config.ts files across the repository (15 in packages/*, 7 in plugins/*). Since the packages/* and plugins/* workspace definitions lack ignore patterns for oxlint.config.ts, Knip will report these configuration files as unused exports.
Add oxlint.config.ts to the global ignore array (lines 144–151), or add it to the ignore field in each workspace that has per-package configs.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@knip.config.js` around lines 6 - 9, The knip config currently ignores only
the root-level oxlint.config.ts under the '.' workspace; update the
configuration to also ignore all per-package/plugin oxlint.config.ts files by
adding "oxlint.config.ts" to the global ignore array (the top-level ignore list)
or by adding "oxlint.config.ts" to each workspace's ignore field (e.g., in the
workspace objects that define entry: ['packages/*/...'] or 'plugins/*/...') so
Knip no longer reports the 22 per-package/plugin oxlint.config.ts files as
unused.
|
|
||
| // Clean up transport when closed | ||
| // eslint-disable-next-line unicorn/prefer-add-event-listener -- MCP server requires this signature | ||
| // oxlint-disable-next-line unicorn/prefer-add-event-listener -- false positive from oxlint |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# 1) Check whether ESLint still configures unicorn rule(s)
rg -n -C3 "eslint-plugin-unicorn|unicorn/prefer-add-event-listener|prefer-add-event-listener" --type=js --type=ts --glob '!**/node_modules/**'
# 2) Inspect suppressions in target file
rg -n -C2 "oxlint-disable-next-line unicorn/prefer-add-event-listener|eslint-disable-next-line unicorn/prefer-add-event-listener|transport\\.onclose" packages/project-builder-server/src/dev-server/mcp/fastify.tsRepository: halfdomelabs/baseplate
Length of output: 37857
🏁 Script executed:
# Check for ESLint config in project-builder-server
find packages/project-builder-server -maxdepth 3 -name "eslint.config.*" -o -name ".eslintrc*" | head -20
# Check package.json to see which config is extended
fd "package.json" packages/project-builder-server --maxdepth 2 -x grep -A 10 -B 5 "eslint"
# Verify the main TypeScript config that would apply
cat packages/tools/eslint-configs/typescript.js | head -260 | tail -30Repository: halfdomelabs/baseplate
Length of output: 2279
🏁 Script executed:
# Check the content of project-builder-server's own eslint config
cat packages/project-builder-server/eslint.config.jsRepository: halfdomelabs/baseplate
Length of output: 217
🏁 Script executed:
# Find and examine the defineNodeEslintConfig function
fd "eslint-node" packages/tools -type f -name "*.ts" -o -name "*.js" | head -10Repository: halfdomelabs/baseplate
Length of output: 236
🏁 Script executed:
# Find the defineNodeEslintConfig function
rg -l "defineNodeEslintConfig" packages/tools --type ts --type jsRepository: halfdomelabs/baseplate
Length of output: 134
🏁 Script executed:
# Examine the defineNodeEslintConfig implementation
cat packages/tools/eslint.config.node.jsRepository: halfdomelabs/baseplate
Length of output: 1125
🏁 Script executed:
# Confirm the full list of disabled unicorn rules in the typescript config
rg -A 50 "unicorn/" packages/tools/eslint-configs/typescript.js | grep "unicorn/" | head -30Repository: halfdomelabs/baseplate
Length of output: 968
🏁 Script executed:
# Check if there are any ESLint rule overrides for the MCP directory
rg -B 5 -A 10 "dev-server|mcp" packages/tools/eslint-configs/typescript.jsRepository: halfdomelabs/baseplate
Length of output: 48
🏁 Script executed:
# Verify the actual code structure at the problematic line and understand the pattern
cat -n packages/project-builder-server/src/dev-server/mcp/fastify.ts | sed -n '45,55p'Repository: halfdomelabs/baseplate
Length of output: 569
Keep ESLint suppression alongside OxLint
On Line 49, the ESLint disable directive for unicorn/prefer-add-event-listener was removed while keeping only the OxLint directive. Since unicorn/prefer-add-event-listener is not globally disabled in ESLint configuration and both linters run in CI, this will cause ESLint to fail on the property assignment pattern at Line 50.
Suggested patch
- // oxlint-disable-next-line unicorn/prefer-add-event-listener -- false positive from oxlint
+ // eslint-disable-next-line unicorn/prefer-add-event-listener -- false positive for property-based callback API
+ // oxlint-disable-next-line unicorn/prefer-add-event-listener -- false positive from oxlint
transport.onclose = () => {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/project-builder-server/src/dev-server/mcp/fastify.ts` at line 49,
Restore the removed ESLint suppression by adding the eslint-disable comment for
unicorn/prefer-add-event-listener back next to the existing oxlint directive
immediately above the property assignment that triggers the rule (the comment
that was on Line 49); specifically add "eslint-disable-next-line
unicorn/prefer-add-event-listener" alongside the existing oxlint comment so both
linters are satisfied.
| import oxlintConfig from '../oxlint.config.base.ts'; | ||
|
|
||
| // @ts-ignore -- oxlintConfig is not typed correctly | ||
| const oxlintEslintConfigs = oxlint.buildFromOxlintConfig(oxlintConfig); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Inspect tools package module wiring and where the TS config is consumed from JS.
jq '{name,type,main,exports,files,scripts}' packages/tools/package.json
rg -n -C2 "oxlint.config.base" packages/tools
rg -n -C2 "eslint-configs/oxlint" packages/toolsRepository: halfdomelabs/baseplate
Length of output: 3481
🏁 Script executed:
cd packages/tools && find . -maxdepth 2 -type f \( -name "*.config.*" -o -name ".loader*" -o -name "package.json" \) | head -20Repository: halfdomelabs/baseplate
Length of output: 314
🏁 Script executed:
# Check for TypeScript loaders in root config
cd packages/tools && cat package.json | grep -A5 -B5 "type\|loader\|tsx\|ts-node" || echo "No loader config in package.json"Repository: halfdomelabs/baseplate
Length of output: 2096
🏁 Script executed:
# Check if .ts files are in the build output or if there's a build step
cat packages/tools/tsconfig*.json 2>/dev/null | head -50Repository: halfdomelabs/baseplate
Length of output: 1313
🏁 Script executed:
# Look for loader or tsx configuration in repo root and package setup
git ls-files | grep -E "(loader|tsx|register)" | head -10Repository: halfdomelabs/baseplate
Length of output: 983
🏁 Script executed:
# Check the actual eslint.config.node.js to see how it's meant to be executed
sed -n '1,20p' packages/tools/eslint.config.node.jsRepository: halfdomelabs/baseplate
Length of output: 814
🏁 Script executed:
# Check root-level eslint/tsconfig setup
cat .eslintrc.json 2>/dev/null || cat .eslintrc.js 2>/dev/null || cat .eslintrc.yaml 2>/dev/null || echo "No .eslintrc found at root"Repository: halfdomelabs/baseplate
Length of output: 92
🏁 Script executed:
# Check if there's a build output directory or how eslint.config.js is meant to be used
git ls-files | grep -E "eslint.config|loader" | head -20Repository: halfdomelabs/baseplate
Length of output: 1532
🏁 Script executed:
# Look at how the repo root oxlint.config.ts compares with the oxlint.js config
echo "=== oxlint.config.ts (root, .ts file) ===" && head -10 packages/tools/oxlint.config.ts && echo -e "\n=== oxlint.js (in eslint-configs, .js file) ===" && cat packages/tools/eslint-configs/oxlint.jsRepository: halfdomelabs/baseplate
Length of output: 675
🏁 Script executed:
# Check if oxlint.config.base.ts is actually being distributed/built
cat packages/tools/package.json | grep -A10 '"files"'Repository: halfdomelabs/baseplate
Length of output: 337
Use the package export for oxlint.config.base.ts instead of a relative import.
Line 4 imports ../oxlint.config.base.ts with a relative path, but oxlint.config.base.ts is excluded from the "files" array in package.json and will not be distributed with the package. When ESLint config consumers run eslint.config.node.js or eslint.config.react.js, the import will fail at runtime.
Change to:
import oxlintConfig from '@baseplate-dev/tools/oxlint-config-base';This matches the pattern already used in the root oxlint.config.ts and respects the package export mapping. Also replace // @ts-ignore with `// `@ts-expect-error on line 6 so the suppression self-expires if the typing issue is later resolved.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/tools/eslint-configs/oxlint.js` around lines 4 - 7, Replace the
relative import of oxlint.config.base.ts with the published package export and
update the TS suppression: import oxlintConfig from
'@baseplate-dev/tools/oxlint-config-base' instead of '../oxlint.config.base.ts',
then keep using oxlint.buildFromOxlintConfig(oxlintConfig) to construct
oxlintEslintConfigs and change the comment above it from // `@ts-ignore` to //
`@ts-expect-error` so the type suppression will fail loudly if the typing is fixed
in the future.
| // React Hooks -- only enable rules-of-hooks rule for performance reasons | ||
| // oxc handles exhaustive-deps rule | ||
| /** @type {ESLintConfig} */ ({ | ||
| files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'], | ||
| plugins: { 'react-hooks': reactHooksPlugin }, | ||
| rules: { | ||
| // Disable new strict rules from react-hooks v7 until we enable React Compiler | ||
| 'react-hooks/refs': 'off', | ||
| 'react-hooks/set-state-in-effect': 'off', | ||
| 'react-hooks/preserve-manual-memoization': 'off', | ||
| 'react-hooks/incompatible-library': 'off', | ||
| 'react-hooks/rules-of-hooks': 'error', | ||
| }, | ||
| }, | ||
| }), |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
What rules are included in eslint-plugin-react-hooks's flat "recommended-latest" config, and does Oxlint/Oxc cover all of them or only react-hooks/exhaustive-deps?
💡 Result:
Rules in eslint-plugin-react-hooks flat recommended-latest
The (flat) recommended-latest config includes the same “recommended” rule set shown in the React docs (i.e., the two classic Hooks rules plus the React-Compiler-related rules): (react.dev)
react-hooks/exhaustive-depsreact-hooks/rules-of-hooksreact-hooks/component-hook-factoriesreact-hooks/configreact-hooks/error-boundariesreact-hooks/gatingreact-hooks/globalsreact-hooks/immutabilityreact-hooks/incompatible-libraryreact-hooks/preserve-manual-memoizationreact-hooks/purityreact-hooks/refsreact-hooks/set-state-in-effectreact-hooks/set-state-in-renderreact-hooks/static-componentsreact-hooks/unsupported-syntaxreact-hooks/use-memo(react.dev)
Does Oxlint/Oxc cover all of them?
No—Oxlint/Oxc covers the two core Hooks rules, but not the additional compiler-focused rules listed above:
Everything else in eslint-plugin-react-hooks’s recommended-latest (e.g. component-hook-factories, immutability, refs, static-components, etc.) is not covered by Oxlint/Oxc under the React plugin. (react.dev)
Citations:
- 1: https://react.dev/reference/eslint-plugin-react-hooks
- 2: https://react.dev/reference/eslint-plugin-react-hooks
- 3: https://oxc.rs/docs/guide/usage/linter/rules/react/exhaustive-deps
- 4: https://oxc.rs/docs/guide/usage/linter/rules/react/rules-of-hooks
- 5: https://react.dev/reference/eslint-plugin-react-hooks
Keep the preset and disable only exhaustive-deps explicitly.
The recommended-latest config includes 17 rules—not just exhaustive-deps and rules-of-hooks. Replacing it with a one-rule manual config drops 15 additional React Compiler-related rules (e.g., component-hook-factories, immutability, refs, set-state-in-effect, static-components, etc.). Oxlint/Oxc covers only the two core Hooks rules and does not provide equivalents for these compiler-focused rules.
To keep coverage while delegating only exhaustive-deps to Oxlint, extend the preset and disable that single rule:
{ ...reactHooksPlugin.configs.flat['recommended-latest'], rules: { 'react-hooks/exhaustive-deps': 'off' } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/tools/eslint-configs/react.js` around lines 75 - 83, The current
manual react-hooks config replaces the plugin preset and drops many React
Compiler rules; instead restore the plugin preset by using
reactHooksPlugin.configs.flat['recommended-latest'] and override only the
exhaustive-deps rule to 'off' (keep the plugin reference reactHooksPlugin and
ensure 'react-hooks/rules-of-hooks' remains enabled by inheriting the preset,
e.g. spread the preset and set rules: { 'react-hooks/exhaustive-deps': 'off' }).
| // Require toThrow with an error message | ||
| 'vitest/require-to-throw-message': 'error', |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Read-only check: find zero-arg toThrow/toThrowError calls that will violate the new rule.
# Expected result: no matches.
rg -nP --type=ts --type=tsx --type=js --type=jsx '\.toThrow(?:Error)?\(\s*\)' \
-g '!**/node_modules/**' \
-g '!**/dist/**'Repository: halfdomelabs/baseplate
Length of output: 93
🏁 Script executed:
#!/bin/bash
# Search for zero-arg toThrow/toThrowError calls in test files
# Adjusted to avoid file type issues
rg -nP '\.toThrow(?:Error)?\(\s*\)' \
--glob='*.test.ts' \
--glob='*.test.js' \
--glob='*.spec.ts' \
--glob='*.spec.js' \
--glob='**/*.{unit,int}.test.ts' \
-g '!**/node_modules/**' \
-g '!**/dist/**' \
-g '!**/build/**'Repository: halfdomelabs/baseplate
Length of output: 2263
Address zero-argument .toThrow() calls before enforcing vitest/require-to-throw-message.
The vitest/require-to-throw-message rule at line 295 will cause immediate lint failures. At least 19 instances of zero-argument .toThrow(), .not.toThrow(), and .rejects.toThrow() assertions exist across the codebase:
- packages/utils/src/events/typed-event-emitter.unit.test.ts
- packages/utils/src/arrays/assert-no-duplicates.unit.test.ts
- examples/todo-with-better-auth/apps/backend/src/modules/storage/utils/mime.unit.test.ts
- packages/sync/src/templates (multiple files)
- packages/project-builder-lib/src/migrations/migrations.unit.test.ts
- packages/core-generators/src/renderers/typescript/extractor/extract-ts-template-variables-simple.unit.test.ts
Either fix all violations first or disable the rule until compliance is achieved.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/tools/eslint-configs/typescript.js` around lines 294 - 295, The new
lint rule 'vitest/require-to-throw-message' will fail existing tests that call
.toThrow(), .not.toThrow(), or .rejects.toThrow() without an expected message;
either update each failing test (e.g., in
packages/utils/src/events/typed-event-emitter.unit.test.ts,
packages/utils/src/arrays/assert-no-duplicates.unit.test.ts,
examples/todo-with-better-auth/.../mime.unit.test.ts,
packages/sync/src/templates,
packages/project-builder-lib/src/migrations/migrations.unit.test.ts,
packages/core-generators/.../extract-ts-template-variables-simple.unit.test.ts)
to provide an explicit message or regex (use .toThrow('message') or
.toThrow(/pattern/) or assert the Error constructor/type), or temporarily
disable the rule by changing 'vitest/require-to-throw-message' from 'error' to
'off' in the eslint config (typescript.js) until all tests are updated; pick one
approach and apply it consistently.
| 'no-unassigned-import': [ | ||
| 'error', | ||
| { | ||
| allow: ['**/*.css', '**/vitest'], | ||
| }, |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
In Oxlint config, what is the correct rule identifier for the unassigned import rule: no-unassigned-importorimport/no-unassigned-import?
💡 Result:
Use import/no-unassigned-import (and enable the import plugin), e.g.:
{
"plugins": ["import"],
"rules": { "import/no-unassigned-import": "error" }
}Oxlint’s rule docs and CLI example both use import/no-unassigned-import. [1]
Sources
[1] Oxlint rule docs: import/no-unassigned-import https://oxc.rs/docs/guide/usage/linter/rules/import/no-unassigned-import
🏁 Script executed:
cat -n packages/tools/oxlint.config.base.ts | sed -n '20,90p'Repository: halfdomelabs/baseplate
Length of output: 2522
Use the canonical rule key for unassigned imports.
Line 23 uses no-unassigned-import, while line 85 uses import/no-unassigned-import. According to Oxlint's official documentation, import/no-unassigned-import is the correct rule identifier. This inconsistency means the allowlist configuration on line 23–27 may not apply to the override on line 85.
🔧 Proposed fix
- 'no-unassigned-import': [
+ 'import/no-unassigned-import': [
'error',
{
allow: ['**/*.css', '**/vitest'],
},
],📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 'no-unassigned-import': [ | |
| 'error', | |
| { | |
| allow: ['**/*.css', '**/vitest'], | |
| }, | |
| 'import/no-unassigned-import': [ | |
| 'error', | |
| { | |
| allow: ['**/*.css', '**/vitest'], | |
| }, |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/tools/oxlint.config.base.ts` around lines 23 - 27, The rule key is
inconsistent: replace the incorrect 'no-unassigned-import' rule entry with the
canonical 'import/no-unassigned-import' so the allowlist object is applied to
the same rule referenced elsewhere; update the rule name where it's defined (the
array with the allow: ['**/*.css', '**/vitest']) to
'import/no-unassigned-import' and ensure any overrides that reference
'import/no-unassigned-import' remain consistent.
| "./eslint-configs/storybook": "./eslint-configs/storybook.js", | ||
| "./eslint-node": "./eslint.config.node.js", | ||
| "./eslint-react": "./eslint.config.react.js", | ||
| "./oxlint-config-base": "./oxlint.config.base.ts", |
There was a problem hiding this comment.
Missing oxlint.config.base.ts in the files array.
The new export "./oxlint-config-base" points to ./oxlint.config.base.ts, but the files array doesn't include this file. When the package is published, this file won't be included, causing the export to fail for consumers.
🐛 Proposed fix to include the oxlint config file
"files": [
"eslint-configs/**/*.js",
"prettier.config.*.js",
"eslint.config.*.js",
"tsconfig.*.json",
"vitest.*.js",
- "src-subpath-import-plugin.js"
+ "src-subpath-import-plugin.js",
+ "oxlint.config.base.ts"
],Also applies to: 44-51
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/tools/package.json` at line 32, The package export
"./oxlint-config-base" references "./oxlint.config.base.ts" but that file is not
listed in the package "files" array, so add "oxlint.config.base.ts" (matching
exact filename and extension) to the "files" array in
packages/tools/package.json; also ensure any other related entries (the other
files array ranges mentioned around lines 44-51) include the same file so the
export is bundled when publishing.
Summary by CodeRabbit
Release Notes
New Features
pnpm check:fullcommand for comprehensive validation including metadata sync and dependency checks.Improvements
pnpm checknow optimizes performance by validating only affected packages during development.Dependencies