Skip to content

fix(oxlint-plugin): scope the server file suffix ban to Next.js - #9

Merged
yordis merged 1 commit into
mainfrom
yordis/fix-next-only-server-suffix
Oct 17, 2026
Merged

yordis merged 1 commit into
mainfrom
yordis/fix-next-only-server-suffix

Conversation

@yordis

@yordis yordis commented Oct 17, 2026 •

Copy link
Copy Markdown
Member
  • Outside Next.js, frameworks such as React Router on Vite use .server modules to keep code out of the client bundle, so banning the suffix in every app preset rejects a convention those projects depend on.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ec64e867-7ab8-4c36-8195-256f8f770a82
📥 Commits

Reviewing files that changed from the base of the PR and between c3ec576 and c3d3935.

📒 Files selected for processing: 4
  • packages/@trogonstack/oxlint-plugin/README.md
  • packages/@trogonstack/oxlint-plugin/configs/app-structure.json
  • packages/@trogonstack/oxlint-plugin/configs/nextjs.json
  • packages/@trogonstack/oxlint-plugin/tests/node/configs/presets.test.ts
💤 Files with no reviewable changes: 1
  • packages/@trogonstack/oxlint-plugin/configs/app-structure.json

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The no-server-file-suffix rule is removed from the app-structure building block and enabled as an error in the Next.js preset. The README and preset tests are updated to reflect and check this scope.

Changes

Preset Rule Scope

Layer / File(s) Summary
Rule configuration and documentation
packages/@trogonstack/oxlint-plugin/configs/app-structure.json, packages/@trogonstack/oxlint-plugin/configs/nextjs.json, packages/@trogonstack/oxlint-plugin/README.md
The app-structure configuration no longer enables no-server-file-suffix. The Next.js configuration enables it as an error. The README reflects these preset compositions.
Preset behavior tests
packages/@trogonstack/oxlint-plugin/tests/node/configs/presets.test.ts
The Next.js framework-only rules list includes no-server-file-suffix. A Vite preset test expects no diagnostics for a .server.ts file under src/app/_services.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to c3d39

The suffix restriction now targets Next.js, while Vite’s .server.ts convention remains unblocked. The supplied changes identify no concrete merge blocker.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly states that the server file suffix ban is limited to Next.js. This matches the main change.
Description check Passed The description explains why the suffix ban should not apply to non-Next.js frameworks such as React Router on Vite. This matches the changeset.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

A rabbit checks the presets in the morning light.
The Next.js rule now sits in its list.
The Vite test finds no diagnostics.
The README follows the changed settings.
I twitch my nose and hop away.

Comment @coderabbitai help to get the list of available commands.

@yordis
yordis merged commit afa90a9 into main Oct 17, 2026
5 checks passed
@yordis
yordis deleted the yordis/fix-next-only-server-suffix branch October 17, 2026 04:03
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