Skip to content

chore: replace ESLint and Prettier with oxlint and oxfmt#40

Merged
Prashant-Surya merged 5 commits intomainfrom
chore/replace-eslint-prettier-with-oxc
Apr 12, 2026
Merged

chore: replace ESLint and Prettier with oxlint and oxfmt#40
Prashant-Surya merged 5 commits intomainfrom
chore/replace-eslint-prettier-with-oxc

Conversation

@sriramveeraghanta
Copy link
Copy Markdown
Member

@sriramveeraghanta sriramveeraghanta commented Apr 12, 2026

Summary

  • Replaces ESLint with oxlint and Prettier with oxfmt (oxc toolchain) for significantly faster linting and formatting
  • Migrated configs using @oxlint/migrate and oxfmt --migrate=prettier to preserve existing rules and formatting settings
  • Removed 7 ESLint-related packages (eslint, @eslint/js, @typescript-eslint/*, typescript-eslint, globals, eslint-plugin-unused-imports) and prettier
  • Replaced unused-imports/* rules with native typescript/no-unused-vars (oxlint built-in)

Changes

  • New: .oxlintrc.json, .oxfmtrc.json
  • Deleted: eslint.config.mjs, .prettierrc, .prettierignore
  • Updated: package.json scripts and devDependencies, CLAUDE.md
  • Reformatted: source and test files reformatted by oxfmt (Prettier-compatible output)

Test plan

  • pnpm check:lint — passes (107 warnings, 0 errors)
  • pnpm check:format — passes after pnpm fix:format
  • pnpm fix:lint — auto-fix works
  • pnpm fix:format — formatting works
  • pnpm build — builds successfully

Summary by CodeRabbit

  • Chores

    • Bumped package to 0.2.11 and upgraded axios to 1.15.0.
    • Switched lint/format tooling to oxlint/oxfmt, added configs, and removed legacy ESLint/Prettier files and ignores.
    • Standardized CI workflow formatting and adjusted node setup quoting.
  • Documentation

    • Updated developer guidance to reference the new lint/format tooling and improved example/readme formatting.

Migrates from ESLint + Prettier to the oxc toolchain (oxlint + oxfmt) for
faster linting and formatting. Uses the automated migration tools
(@oxlint/migrate and oxfmt --migrate=prettier) to preserve existing rule
configuration and formatting settings.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 12, 2026

📝 Walkthrough

Walkthrough

Replaced ESLint/Prettier with oxlint/oxfmt (configs and scripts), added formatting/lint configs, adjusted package.json (deps, scripts, overrides), normalized CI YAML formatting, and applied widespread non-functional formatting edits across source, tests, docs, and configs. No runtime or API behavior changes.

Changes

Cohort / File(s) Summary
Linting & formatting configs
./.oxfmtrc.json, ./.oxlintrc.json, ./.prettierrc, ./.prettierignore, ./eslint.config.mjs
Added oxfmt/oxlint configs; removed Prettier config/ignore and deleted the ESLint flat config.
Package & dependency updates
./package.json
Bumped version, replaced ESLint/Prettier devDeps with oxlint/oxfmt, updated lint/format scripts, bumped axios, and migrated resolutionspnpm.overrides (adjusted overrides).
CI workflows
./.github/workflows/build-test.yaml, ./.github/workflows/publish-node-sdk.yml
Normalized YAML indentation and standardized quoting; workflow steps, commands, and secrets remain unchanged.
Project tooling & configs
./jest.config.js, ./tsconfig.jest.json, ./CLAUDE.md
Formatting/quoting normalized; CLAUDE.md updated to reference oxlint/oxfmt.
API surface formatting
src/api/...
src/api/AgentRuns/*, src/api/Initiatives/*, src/api/Teamspaces/*, src/api/WorkItems/*, src/api/WorkItemProperties/*
Widespread non-functional formatting: multi-line ↔ single-line signatures, import formatting, removed trailing commas/blank lines; endpoints, types, and return types unchanged.
Core source & small edits
src/Configuration.ts, assorted src/... files
Minor quoting and parameter formatting changes; no public API/signature changes.
Tests & test docs
tests/unit/**, tests/e2e/project.test.ts, tests/unit/README.md
Converted some multi-line literals/invocations to single-line, removed trailing blank lines, and minor README spacing edits; test logic and assertions unchanged.
Examples & misc
examples/README.md, assorted small files
Whitespace, blank-line, and trailing-newline fixes across examples and scattered files.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through lint and formatter lanes,
Swapped rules and smoothed the whitespace plains,
Quotes now sparkle, lines align true,
I left the repo tidy for you.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main change: replacing ESLint and Prettier with oxlint and oxfmt, which is the primary objective of this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/replace-eslint-prettier-with-oxc

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

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

The `resolutions` field is Yarn-specific. Use `pnpm.overrides` instead,
which is the correct equivalent for pnpm package manager.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/api/WorkItems/WorkLogs.ts (1)

55-59: ⚠️ Potential issue | 🟠 Major

Use del as the standard delete method name.

This resource exposes delete(...) instead of the standard del(...). Please make del(...) canonical (optionally keep delete(...) as a compatibility alias).

Suggested change
-  async delete(workspaceSlug: string, projectId: string, workItemId: string, workLogId: string): Promise<void> {
-    return this.httpDelete(
-      `/workspaces/${workspaceSlug}/projects/${projectId}/work-items/${workItemId}/worklogs/${workLogId}/`
-    );
-  }
+  async del(workspaceSlug: string, projectId: string, workItemId: string, workLogId: string): Promise<void> {
+    return this.httpDelete(
+      `/workspaces/${workspaceSlug}/projects/${projectId}/work-items/${workItemId}/worklogs/${workLogId}/`
+    );
+  }
+
+  /** `@deprecated` Use del(...) */
+  async delete(workspaceSlug: string, projectId: string, workItemId: string, workLogId: string): Promise<void> {
+    return this.del(workspaceSlug, projectId, workItemId, workLogId);
+  }

As per coding guidelines: src/api/**/*.ts: Standard resource methods should be named: list, create, retrieve, update, del.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/api/WorkItems/WorkLogs.ts` around lines 55 - 59, The method on WorkLogs
currently exposes delete(...) but must use the standard del(...) name; add a new
async del(workspaceSlug: string, projectId: string, workItemId: string,
workLogId: string): Promise<void> that calls the same this.httpDelete(...) path,
and preserve the existing delete(...) as a thin compatibility alias that
forwards to del(...). Update references/tests to use del if any.
src/api/WorkItems/Attachments.ts (1)

81-85: ⚠️ Potential issue | 🟠 Major

Expose del as the standard delete method.

delete(...) deviates from the resource method naming convention. Please make del(...) the canonical method (you can keep delete(...) as a temporary alias for compatibility).

Suggested change
-  async delete(workspaceSlug: string, projectId: string, workItemId: string, attachmentId: string): Promise<void> {
-    return this.httpDelete(
-      `/workspaces/${workspaceSlug}/projects/${projectId}/work-items/${workItemId}/attachments/${attachmentId}/`
-    );
-  }
+  async del(workspaceSlug: string, projectId: string, workItemId: string, attachmentId: string): Promise<void> {
+    return this.httpDelete(
+      `/workspaces/${workspaceSlug}/projects/${projectId}/work-items/${workItemId}/attachments/${attachmentId}/`
+    );
+  }
+
+  /** `@deprecated` Use del(...) */
+  async delete(workspaceSlug: string, projectId: string, workItemId: string, attachmentId: string): Promise<void> {
+    return this.del(workspaceSlug, projectId, workItemId, attachmentId);
+  }

As per coding guidelines: src/api/**/*.ts: Standard resource methods should be named: list, create, retrieve, update, del.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/api/WorkItems/Attachments.ts` around lines 81 - 85, The method name
delete(...) breaks the standard resource naming; add a new canonical
del(workspaceSlug, projectId, workItemId, attachmentId): Promise<void> that
performs the HTTP DELETE via this.httpDelete(...) and keep the existing
delete(...) as a thin compatibility wrapper that simply calls and returns
this.del(...); update any internal references to use del where appropriate and
ensure both methods share the same signature (attachmentId param and
Promise<void> return).
🧹 Nitpick comments (1)
.github/workflows/build-test.yaml (1)

21-23: Pin Node version in CI for deterministic runs.

actions/setup-node@v4 is used without node-version; runner-image changes can silently alter lint/build behavior. Pin to Node 20 to align with SDK engine expectations (>=20.0.0).

Suggested workflow change
       - name: Set up Node.js
         uses: actions/setup-node@v4
+        with:
+          node-version: "20"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/build-test.yaml around lines 21 - 23, The workflow uses
actions/setup-node@v4 without pinning a Node version which can cause
non-deterministic CI runs; update the GitHub Actions step that uses
actions/setup-node@v4 to explicitly set node-version: '20' (or node-version:
'20.x') so the runner uses Node 20 to match the SDK engine constraint (>=20.0.0)
and ensure deterministic lint/build behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/api/WorkItems/Activities.ts`:
- Line 22: The parameter declaration params?: any in Activities.ts weakens type
safety; replace it with a concrete type (e.g., define and use an
ActivityListParams interface or type reflecting allowed query fields such as
page, pageSize, filter, sort) or, if the shape is genuinely unknown, use
params?: unknown and add runtime type guards/validation before use. Update the
function signature(s) referencing params and any callers to use the new
ActivityListParams (or perform validation where params is consumed) so the
codebase no longer uses any for list parameters.

---

Outside diff comments:
In `@src/api/WorkItems/Attachments.ts`:
- Around line 81-85: The method name delete(...) breaks the standard resource
naming; add a new canonical del(workspaceSlug, projectId, workItemId,
attachmentId): Promise<void> that performs the HTTP DELETE via
this.httpDelete(...) and keep the existing delete(...) as a thin compatibility
wrapper that simply calls and returns this.del(...); update any internal
references to use del where appropriate and ensure both methods share the same
signature (attachmentId param and Promise<void> return).

In `@src/api/WorkItems/WorkLogs.ts`:
- Around line 55-59: The method on WorkLogs currently exposes delete(...) but
must use the standard del(...) name; add a new async del(workspaceSlug: string,
projectId: string, workItemId: string, workLogId: string): Promise<void> that
calls the same this.httpDelete(...) path, and preserve the existing delete(...)
as a thin compatibility alias that forwards to del(...). Update references/tests
to use del if any.

---

Nitpick comments:
In @.github/workflows/build-test.yaml:
- Around line 21-23: The workflow uses actions/setup-node@v4 without pinning a
Node version which can cause non-deterministic CI runs; update the GitHub
Actions step that uses actions/setup-node@v4 to explicitly set node-version:
'20' (or node-version: '20.x') so the runner uses Node 20 to match the SDK
engine constraint (>=20.0.0) and ensure deterministic lint/build behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 777bfd60-f612-4279-8cc6-b833474711bb

📥 Commits

Reviewing files that changed from the base of the PR and between 7f00422 and 5892647.

📒 Files selected for processing (36)
  • .github/workflows/build-test.yaml
  • .github/workflows/publish-node-sdk.yml
  • .oxfmtrc.json
  • .oxlintrc.json
  • .prettierignore
  • .prettierrc
  • CLAUDE.md
  • eslint.config.mjs
  • examples/README.md
  • jest.config.js
  • package.json
  • src/Configuration.ts
  • src/api/AgentRuns/Activities.ts
  • src/api/AgentRuns/index.ts
  • src/api/Initiatives/Epics.ts
  • src/api/Initiatives/Labels.ts
  • src/api/Initiatives/Projects.ts
  • src/api/Initiatives/index.ts
  • src/api/Teamspaces/Members.ts
  • src/api/Teamspaces/Projects.ts
  • src/api/Teamspaces/index.ts
  • src/api/WorkItemProperties/Options.ts
  • src/api/WorkItems/Activities.ts
  • src/api/WorkItems/Attachments.ts
  • src/api/WorkItems/WorkLogs.ts
  • tests/e2e/project.test.ts
  • tests/unit/README.md
  • tests/unit/agent-runs/activities.test.ts
  • tests/unit/agent-runs/agent-runs.test.ts
  • tests/unit/initiative.test.ts
  • tests/unit/milestone.test.ts
  • tests/unit/sticky.test.ts
  • tests/unit/teamspace.test.ts
  • tests/unit/work-items/work-items.test.ts
  • tests/unit/workspace-features.test.ts
  • tsconfig.jest.json
💤 Files with no reviewable changes (11)
  • src/api/Teamspaces/index.ts
  • tests/unit/agent-runs/agent-runs.test.ts
  • src/api/Initiatives/index.ts
  • tests/unit/workspace-features.test.ts
  • .prettierrc
  • src/api/AgentRuns/index.ts
  • .prettierignore
  • tests/unit/initiative.test.ts
  • src/api/AgentRuns/Activities.ts
  • tests/unit/sticky.test.ts
  • eslint.config.mjs

projectId: string,
workItemId: string,
params?: any,
params?: any
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Replace any in list params with an explicit type.

Line 22 uses params?: any, which weakens type safety and violates the repo TypeScript rule.

Proposed fix
-    params?: any
+    params?: { limit?: number; offset?: number }

As per coding guidelines: "src/**/*.ts: Avoid any types; use proper typing or unknown with type guards".

📝 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.

Suggested change
params?: any
params?: { limit?: number; offset?: number }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/api/WorkItems/Activities.ts` at line 22, The parameter declaration
params?: any in Activities.ts weakens type safety; replace it with a concrete
type (e.g., define and use an ActivityListParams interface or type reflecting
allowed query fields such as page, pageSize, filter, sort) or, if the shape is
genuinely unknown, use params?: unknown and add runtime type guards/validation
before use. Update the function signature(s) referencing params and any callers
to use the new ActivityListParams (or perform validation where params is
consumed) so the codebase no longer uses any for list parameters.

sriramveeraghanta and others added 3 commits April 12, 2026 16:35
This repo is standalone and not part of a pnpm workspace catalog,
so explicit version ranges are needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove flatted, minimatch@9, and ajv@6 overrides as none of these
packages exist in the dependency tree.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
package.json (1)

27-30: Consider using --deny-warnings to fail CI on lint warnings.

The check:lint script currently allows warnings to pass. With 107 warnings noted in the PR, use oxlint's --deny-warnings flag to ensure warnings produce a non-zero exit code and fail the build.

Suggested script update
-    "check:lint": "oxlint",
+    "check:lint": "oxlint --deny-warnings",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 27 - 30, Update the lint check script so lint
warnings cause CI failure: modify the "check:lint" npm script (in package.json
scripts) to include oxlint's --deny-warnings flag (e.g., add --deny-warnings to
the existing "check:lint" command) so oxlint exits non‑zero on warnings; ensure
no other scripts (like "fix:lint") are changed so developers can still run fixes
locally.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@package.json`:
- Around line 27-30: Update the lint check script so lint warnings cause CI
failure: modify the "check:lint" npm script (in package.json scripts) to include
oxlint's --deny-warnings flag (e.g., add --deny-warnings to the existing
"check:lint" command) so oxlint exits non‑zero on warnings; ensure no other
scripts (like "fix:lint") are changed so developers can still run fixes locally.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: aa79e9de-d87b-4bd6-8162-939ddc649632

📥 Commits

Reviewing files that changed from the base of the PR and between f514af2 and a890251.

📒 Files selected for processing (1)
  • package.json

@Prashant-Surya Prashant-Surya merged commit b5534e8 into main Apr 12, 2026
2 checks passed
@Prashant-Surya Prashant-Surya deleted the chore/replace-eslint-prettier-with-oxc branch April 12, 2026 18:34
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.

2 participants