Skip to content

feat(linter): integrate oxlint and resolve all linting warnings#800

Merged
yamadashy merged 6 commits intomainfrom
chore/oxlint
Aug 24, 2025
Merged

feat(linter): integrate oxlint and resolve all linting warnings#800
yamadashy merged 6 commits intomainfrom
chore/oxlint

Conversation

@yamadashy
Copy link
Owner

This PR integrates oxlint into the linting pipeline and resolves all linting warnings to significantly improve code quality.

Summary

  • Integrate oxlint: Add oxlint as a high-performance linter (50-100x faster than ESLint)
  • Fix all 144 warnings: Comprehensive cleanup of unused imports, parameters, and variables
  • Add CI integration: Include oxlint in GitHub Actions workflow
  • Configure oxlint: Set up proper configuration for the project

Changes

Linter Integration

  • Add oxlint as dev dependency and integrate into npm run lint
  • Create .oxlintrc.json configuration file
  • Add oxlint job to GitHub Actions CI workflow
  • Update lint script order: biome → oxlint → ts → secretlint

Code Quality Fixes (67 files modified)

  • Unused imports: Removed unused type and function imports across test and source files
  • Unused parameters: Prefixed intentionally unused parameters with underscore (_context, _index)
  • Unused catch parameters: Use modern JavaScript syntax by omitting unused error parameters
  • Generator functions: Fix require-yield warnings in test files
  • Unused variables: Remove or prefix unused variable declarations
  • Regex patterns: Fix unnecessary escape characters flagged by oxlint

Performance Benefits

  • 50-100x faster linting with oxlint vs ESLint
  • 500+ rules from ESLint ecosystem including TypeScript-specific rules
  • Parallel execution that scales with CPU cores
  • Non-blocking warnings for gradual code improvement

Test Results

  • ✅ All 743 tests pass
  • ✅ All linting tools pass (biome, oxlint, TypeScript, secretlint)
  • ✅ No functionality regressions
  • ✅ Significant code quality improvement

Checklist

  • Run npm run test
  • Run npm run lint

- Add oxlint as dev dependency and integrate into npm run lint
- Create oxlint configuration with warning levels for gradual adoption
- Add oxlint CI job to GitHub Actions
- Fix regex patterns flagged by oxlint:
  - Remove unnecessary escape characters in file regex patterns
  - Fix regex patterns in website validation and PHP test files
- Update lint script order: biome -> oxlint -> ts -> secretlint

oxlint provides 50-100x faster linting with 500+ rules from ESLint ecosystem.
Current warnings are configured as non-blocking to allow gradual improvement.
- Remove unused imports across 67 files (RepomixConfigMerged, QueryCapture, etc.)
- Fix unused parameters by prefixing with underscore (_context, _index, etc.)
- Remove unused catch parameters using modern JavaScript syntax
- Fix require-yield warnings in generator functions
- Remove unused variables and interface declarations
- Add oxlint configuration to ignore integration test fixtures

Resolves 144 linting warnings while preserving all functionality.
All 743 tests continue to pass. Code quality significantly improved.
Copilot AI review requested due to automatic review settings August 24, 2025 09:28
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 24, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Adds Oxlint to the repo: config file, npm script, and a CI job. Cleans up unused imports/params and adopts optional catch bindings across many files and tests. Adjusts a few regex character classes. Updates packager to inject and call writeOutputToDisk via dependencies.

Changes

Cohort / File(s) Summary
CI and tooling
\.github/workflows/ci.yml, package.json, .oxlintrc.json
Add lint-oxlint CI job; add oxlint devDependency and script; include oxlint in lint chain; introduce Oxlint config ignoring tests/integration-tests.
Packager dependency injection
src/core/packager.ts
Import and wire writeOutputToDisk into defaultDeps and pack overrideDeps; persist output via injected dependency; adjust imports/types accordingly.
Git utilities
src/core/git/gitCommand.ts, src/core/git/gitHubArchive.ts, src/core/git/gitRemoteParse.ts, src/core/git/gitRepositoryHandle.ts
Switch to parameterless catch in several functions; minor regex character class tweak for path normalization. No functional changes.
File processing and manipulation
src/core/file/fileManipulate.ts, src/core/file/fileProcess.ts, src/core/file/workers/fileProcessWorker.ts
PythonManipulator regex character-class simplifications; mark unused map index; remove unused logger import.
CLI cleanup
src/cli/actions/initAction.ts, src/cli/cliRun.ts
Remove unused imports; no behavior changes.
Output utilities
src/core/output/outputSort.ts, src/core/output/outputStyleDecorate.ts
Use parameterless catch; rename unused parameter to underscore-prefixed.
Security and types
src/core/security/validateFileSafety.ts
Remove unused type import; no logic changes.
Tree-sitter loading/parsing
src/core/treeSitter/loadLanguage.ts, src/core/treeSitter/parseFile.ts
Remove unused imports; no behavioral changes.
Tree-sitter strategies (param rename to underscore)
src/core/treeSitter/parseStrategies/*ParseStrategy.ts
Rename unused context parameter to _context (CSS, Default, Go, Python, TypeScript, Vue); additionally rename an unused local in Vue strategy.
MCP tools
src/mcp/tools/attachPackedOutputTool.ts, src/mcp/tools/fileSystemReadFileTool.ts, src/mcp/tools/grepRepomixOutputTool.ts, src/mcp/tools/readRepomixOutputTool.ts
Remove unused imports; adopt parameterless catch in file existence checks.
Benchmarks and browser script
benchmarks/memory/src/simple-memory-test.ts, browser/scripts/generate-icons.ts
Use parameterless catch; remove unused internal interface.
Website (client/server)
website/client/components/utils/resultViewer.ts, website/client/components/utils/validation.ts, website/client/composables/useFileUpload.ts, website/server/src/index.ts, website/server/src/schemas/request.ts
Regex character-class simplifications; parameterless catch; remove unused import in server index.
Tests — broad cleanup
tests/**
Remove unused imports/types/mocks; rename unused params/locals with underscores; adjust a few string literals/escaping and generator mocks to satisfy linting; no test logic changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant CLI as CLI/Caller
  participant Pack as pack()
  participant Deps as defaultDeps
  participant Git as getGitDiffs/getGitLogs
  participant Proc as processFiles
  participant Metrics as calculateMetrics
  participant Gen as generateHandlebarOutput
  participant Writer as writeOutputToDisk

  User->>CLI: invoke pack(...)
  CLI->>Pack: pack(config, overrideDeps?)
  Note over Pack: Merge defaultDeps with overrideDeps
  Pack->>Git: getGitDiffs()/getGitLogs()
  Git-->>Pack: diffs/logs
  Pack->>Proc: processFiles(...)
  Proc-->>Pack: processedFiles
  Pack->>Metrics: calculateMetrics(processedFiles, ...)
  Metrics-->>Pack: metrics
  Pack->>Gen: generateHandlebarOutput(processedFiles, metrics, ...)
  Gen-->>Pack: outputText
  rect rgba(200,255,200,0.25)
  Note right of Writer: New in this change
  Pack->>Writer: writeOutputToDisk(outputText, config, ...)
  end
  Writer-->>Pack: write result
  Pack-->>CLI: result (including persisted output info)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

enhancement

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/oxlint

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@claude
Copy link
Contributor

claude bot commented Aug 24, 2025

Claude encountered an error —— View job


I'll analyze this and get back to you.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @yamadashy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the project's code quality and development efficiency by integrating Oxlint, a high-performance linter. The primary goal is to enforce stricter code standards and improve developer experience through faster feedback cycles. Beyond just adding the linter, this PR also addresses and resolves all existing linting warnings, ensuring a cleaner and more robust codebase. This change streamlines the development process by automating code style and error checking, leading to more consistent and reliable code.

Highlights

  • New Linter Integration: Oxlint: This PR introduces Oxlint, a high-performance linter, into the project's development workflow. Oxlint is significantly faster than traditional linters like ESLint, promising 50-100x speed improvements.
  • Code Quality Improvement: Warning Resolution: A comprehensive cleanup was performed to resolve 144 existing linting warnings. This includes removing unused imports, parameters, and variables, fixing generator functions, and correcting regex patterns. This effort substantially improves the overall code quality and maintainability.
  • CI/CD Integration: Oxlint has been integrated into the Continuous Integration (CI) pipeline via GitHub Actions, ensuring that all future code contributions adhere to the new linting standards. The linting script order has been updated to biome → oxlint → ts → secretlint.
  • Oxlint Configuration: The integration includes proper configuration for Oxlint through a new .oxlintrc.json file, allowing for project-specific rules and ignored patterns, such as excluding integration tests from linting.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@codecov
Copy link

codecov bot commented Aug 24, 2025

Codecov Report

❌ Patch coverage is 88.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.41%. Comparing base (b562099) to head (15fab4f).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
src/core/git/gitCommand.ts 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #800      +/-   ##
==========================================
- Coverage   87.44%   87.41%   -0.03%     
==========================================
  Files         113      113              
  Lines        6491     6493       +2     
  Branches     1331     1331              
==========================================
  Hits         5676     5676              
- Misses        815      817       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully integrates the oxlint linter into the project's tooling and addresses all reported linting warnings across the codebase. The changes are extensive, touching dozens of files, but are consistently high-quality, focusing on removing unused code, fixing minor syntax issues, and adopting modern language features. The introduction of oxlint will undoubtedly contribute to maintaining and improving code quality going forward. The changes are well-executed and I have no further suggestions for improvement. Great work!

Copy link
Contributor

@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: 2

Caution

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

⚠️ Outside diff range comments (1)
src/core/treeSitter/parseStrategies/PythonParseStrategy.ts (1)

95-100: Python: async def signatures are not recognized

The current regex only matches def and will miss async def functions, which means async functions won’t be emitted when captured. Expand the regex to accept an optional async prefix.

Apply this focused change:

   private getFunctionSignature(lines: string[], startRow: number): string | null {
     const line = lines[startRow];
-    const match = line.match(/def\s+(\w+)\s*\((.*?)\)(\s*->\s*[^:]+)?:/);
+    const match = line.match(/(?:async\s+)?def\s+(\w+)\s*\((.*?)\)(\s*->\s*[^:]+)?:/);
     if (!match) return null;
     return line.replace(/:\s*$/, '');
   }

If you want, I can add unit tests that include async def coverage to prevent regressions.

🧹 Nitpick comments (33)
tests/core/output/diffsInOutput.test.ts (2)

126-131: Drop unused binding; just await the call

You don't use the return value. Prefer not assigning to a throwaway variable in tests.

-    const _output = await generateOutput(rootDirs, mockConfig, processedFiles, ['file1.js'], gitDiffResult, undefined, {
+    await generateOutput(rootDirs, mockConfig, processedFiles, ['file1.js'], gitDiffResult, undefined, {

(Optional: if you want stronger coverage, capture it as output and assert the exact string returned by your mock.)


189-195: Same here: remove the unused _output binding

No consumer of the variable; awaiting the promise is sufficient.

-    const _output = await generateOutput(rootDirs, mockConfig, processedFiles, ['file1.js'], gitDiffResult, undefined, {
+    await generateOutput(rootDirs, mockConfig, processedFiles, ['file1.js'], gitDiffResult, undefined, {
tests/core/treeSitter/parseFile.php.test.ts (2)

55-57: Expectation updated to match real PHP import — looks good

Aligning the expectation with use App\\Greeter; ensures the test validates the correct backslash in the parsed output.

If you adopt String.raw for fileContent, you may also use it inline here for readability:

const expectContents = [
  'namespace App;',
  String.raw`use App\Greeter;`,
  // ...
];

7-13: Correctly escaped PHP namespace separator; optional: use String.raw for template literals

You’ve correctly doubled the backslash in the PHP use statement so that \Greeter isn’t swallowed by JS’s escape processing. To future-proof any embedded backticks containing backslashes (e.g. PHP namespaces, Windows paths, regexes), you can convert the template literal to a String.raw tag.

Apply this minimal change in tests/core/treeSitter/parseFile.php.test.ts:

-  const fileContent = `
+  const fileContent = String.raw`

None of the other parseFile*.test.ts fixtures currently include backslashes in their code blocks, so this change is only needed in the PHP test.

src/core/file/workers/fileProcessWorker.ts (1)

3-3: Switch processContent to dynamic import to honor early log-level init.

If you adopt the approach above, drop the static import here to avoid duplicate bindings.

-import { processContent } from '../fileProcessContent.js';
tests/mcp/tools/mcpToolRuntime.test.ts (2)

83-91: Mock crypto.randomBytes closer to real Buffer behavior

Minor robustness tweak: generateOutputId likely calls .toString('hex'). Your mock ignores the encoding arg, which is fine at runtime, but returning a real Buffer reduces type friction and future-proofs the test.

Apply:

-      vi.mocked(crypto.randomBytes).mockImplementation(() => ({
-        toString: () => 'abcdef1234567890',
-      }));
+      vi.mocked(crypto.randomBytes).mockImplementation(() =>
+        Buffer.from('abcdef1234567890', 'utf8'),
+      );

If the production code uses 'hex', prefer:

-      vi.mocked(crypto.randomBytes).mockImplementation(() =>
-        Buffer.from('abcdef1234567890', 'utf8'),
-      );
+      vi.mocked(crypto.randomBytes).mockImplementation(() =>
+        Buffer.from('abcdef1234567890', 'hex'),
+      );

55-59: Path join mock: consider OS-agnostic intent

You’re normalizing path.join to args.join('/'), which is fine in a controlled test but can accidentally mask logic that depends on path.sep. If the implementation under test appends a trailing separator for mkdtemp, prefer a mock that respects separators.

Option:

-      vi.mocked(path.join).mockImplementation((...args) => args.join('/'));
+      vi.mocked(path.join).mockImplementation((...args) => {
+        const sep = '/'; // enforce POSIX consistently for test determinism
+        return args.join(sep);
+      });

Alternatively, assert arguments more loosely (e.g., toHaveBeenCalledWith(expect.stringContaining('/repomix/mcp-outputs'))) instead of pinning the trailing slash.

.oxlintrc.json (1)

3-5: Optional: broaden ignores for heavy or generated assets

If you have large fixtures or generated/site assets, consider ignoring them to keep lint fast and focused.

For example:

   "ignorePatterns": [
-    "tests/integration-tests/**/*"
+    "tests/integration-tests/**/*",
+    "tests/fixtures/**/*",
+    "website/**/public/**/*",
+    "dist/**/*",
+    "coverage/**/*"
   ]
website/client/components/utils/validation.ts (1)

5-20: Optional: tighten URL validation to GitHub-only per docstring

Docstring says “Validates a GitHub repository URL or shorthand,” but new URL(remoteValue) currently accepts any absolute URL (e.g., Google). Consider restricting to GitHub/Gist domains and ensuring owner/repo segments exist. Also, the TODO to share logic with core is a good candidate for centralization.

Example adjustment:

-  try {
-    new URL(remoteValue);
-    return true;
-  } catch {
-    return false;
-  }
+  try {
+    const url = new URL(remoteValue);
+    if (url.protocol !== 'https:') return false;
+    if (!/^(github\.com|gist\.github\.com)$/i.test(url.hostname)) return false;
+    const cleaned = url.pathname.replace(/^\/|\.git$/g, '');
+    const [owner, repo] = cleaned.split('/');
+    return Boolean(owner && repo);
+  } catch {
+    return false;
+  }

If you’d like, I can extract a shared validator used by both client and src/cli/actions/remoteAction.ts.

src/core/output/outputSort.ts (1)

53-56: Optional catch binding is fine; add a trace for easier diagnostics

Behavior unchanged and aligns with the PR’s oxlint goals. As a tiny DX win, emit a trace on failure so we know why we fell back to the original order without elevating log levels.

-  } catch {
-    // If git command fails, return original order
-    return files;
-  }
+  } catch {
+    // If git command fails, return original order
+    logger.trace('Git change-count lookup failed — returning original order');
+    return files;
+  }
benchmarks/memory/src/simple-memory-test.ts (1)

39-41: Use fs.rm with force to avoid try/catch noise

Not required, but this helper can be a one-liner and remain silent if the file doesn’t exist.

-  try {
-    await fs.unlink(path.join(__dirname, '../memory-test-output.txt'));
-  } catch {
-    // Ignore if file doesn't exist
-  }
+  await fs.rm(path.join(__dirname, '../memory-test-output.txt'), { force: true });
src/mcp/tools/readRepomixOutputTool.ts (1)

64-68: Bare catch keeps things simple; consider a trace for visibility

Current behavior is fine (tool returns a structured error). If helpful during support, add a trace log before returning to note the missing path; keeps logs low-noise while aiding diagnostics.

-        } catch {
-          return buildMcpToolErrorResponse({
+        } catch {
+          logger.trace(`read_repomix_output: file not found at path: ${filePath}`);
+          return buildMcpToolErrorResponse({
             errorMessage: `Error: Output file does not exist at path: ${filePath}. The temporary file may have been cleaned up.`,
           });
         }
website/server/src/schemas/request.ts (1)

6-6: Regex escape removal is correct; behavior unchanged.

Unescaping the forward slash inside the character class is safe and keeps / allowed. No functional changes introduced.

If you want to simplify readability, consider putting - at either start or end of the class to avoid escaping it:

/^[a-zA-Z0-9*?/_.,!()\s-]*$/
website/client/composables/useFileUpload.ts (1)

225-229: Bare catch is appropriate here; optional: log in dev to aid debugging.

Switching to catch {} avoids the unused-binding lint warning and doesn’t affect UX (you return a friendly error). Optionally, you could add a dev-only console log to aid debugging without reintroducing the unused param.

Example:

} catch {
  if (import.meta.env?.DEV) {
    // Intentionally generic user message; log details elsewhere if needed
    // e.g., console.error('handleFolderDrop failed');
  }
  const errorMsg = 'Failed to process the folder. Please try again or use the browse button.';
  errorMessage.value = errorMsg;
  return { success: false, error: errorMsg };
}
src/core/git/gitRepositoryHandle.ts (1)

33-38: Consider restoring trace logging in isGitRepository catch for diagnosability.

Other functions in this module trace the error on failure; this one now silently returns false. Adding a trace keeps behavior consistent and aids debugging without affecting callers.

   try {
     await deps.execGitRevParse(directory);
     return true;
-  } catch {
-    return false;
+  } catch (error) {
+    logger.trace('Directory is not a git repository:', (error as Error).message);
+    return false;
   }
tests/core/file/fileStdin.test.ts (2)

256-258: Yield a filtered-out line instead of a valid token to avoid side effects before the throw.

Using 'dummy' creates a valid line that could be processed before the error is thrown. Yielding a comment or whitespace keeps semantics minimal while satisfying require-yield.

-          // This generator needs to throw an error for testing, but must yield first to satisfy require-yield
-          yield 'dummy';
+          // This generator needs to throw an error for testing, but must yield first to satisfy require-yield.
+          // Yield a comment so it gets filtered out by filterValidLines.
+          yield '# comment';
           throw new Error('Generic error');

293-295: Same here: yield a filtered-out line to keep the pre-error emission inert.

Prevents 'dummy' from being treated as a candidate path before the throw.

-          // This generator needs to throw an error for testing, but must yield first to satisfy require-yield
-          yield 'dummy';
+          // This generator needs to throw an error for testing, but must yield first to satisfy require-yield.
+          // Yield a comment so it gets filtered out by filterValidLines.
+          yield '# comment';
           throw 'string error';
src/core/file/fileProcess.ts (1)

29-34: Optional: drop the unused _index parameter entirely.

Since the index isn’t used, removing it simplifies the callback without changing behavior.

-  const tasks = rawFiles.map(
-    (rawFile, _index) =>
-      ({
-        rawFile,
-        config,
-      }) satisfies FileProcessTask,
-  );
+  const tasks = rawFiles.map(
+    (rawFile) =>
+      ({
+        rawFile,
+        config,
+      }) satisfies FileProcessTask,
+  );
src/core/treeSitter/parseStrategies/PythonParseStrategy.ts (1)

89-93: Redundant conditional; simplify and align name with behavior

match is computed but unused, and both branches return the same expression. Consider simplifying and, if desired, renaming the method to reflect that it returns the class definition line without the trailing colon (not “inheritance” specifically).

Apply this minimal simplification:

   private getClassInheritance(lines: string[], startRow: number): string | null {
     const line = lines[startRow];
-    const match = line.match(/class\s+\w+\s*\((.*?)\):/);
-    return match ? line.replace(/:\s*$/, '') : line.replace(/:\s*$/, '');
+    // Return the class definition line without a trailing colon.
+    return line.replace(/:\s*$/, '');
   }
src/core/treeSitter/parseStrategies/GoParseStrategy.ts (2)

120-133: Clean up: unused parameter and misleading name in findClosingToken

openToken is never used and the implementation returns the first line containing closeToken. The method name suggests bracket matching, but the logic doesn’t do that. Consider renaming and simplifying the function and its call sites for clarity.

Here’s a minimal, behavior-preserving refactor:

-  private findClosingToken(
-    lines: string[],
-    startRow: number,
-    endRow: number,
-    openToken: string,
-    closeToken: string,
-  ): number {
-    for (let i = startRow; i <= endRow; i++) {
-      if (lines[i].includes(closeToken)) {
-        return i;
-      }
-    }
-    return startRow;
-  }
+  // Returns the first row in [startRow, endRow] that contains `token`, or startRow if none found.
+  private findFirstLineIncluding(lines: string[], startRow: number, endRow: number, token: string): number {
+    for (let i = startRow; i <= endRow; i++) {
+      if (lines[i].includes(token)) return i;
+    }
+    return startRow;
+  }

And adjust the call sites accordingly:

-      ? this.findClosingToken(lines, startRow, endRow, '(', ')')
+      ? this.findFirstLineIncluding(lines, startRow, endRow, ')')
       : endRow;
-    const signatureEndRow = this.findClosingToken(lines, startRow, endRow, '{', '{');
+    const signatureEndRow = this.findFirstLineIncluding(lines, startRow, endRow, '{');
-      ? this.findClosingToken(lines, startRow, endRow, '{', '}')
+      ? this.findFirstLineIncluding(lines, startRow, endRow, '}')
       : endRow;

Optionally, if you truly need balanced matching in the future, implement a small brace counter.


99-107: Go generics and receivers: names may be missed (FYI, non-blocking)

The current regexes won’t extract names when generics appear immediately after the function name (e.g., func Foo[T any](...)) or with more complex receivers. You already fall back to emitting the signature snippet even when name is not found, so behavior is acceptable. Consider expanding the patterns later if deduping by name is important.

If you want to confirm coverage, I can add unit snippets containing:

  • func Foo[T any](x T) {}
  • func (r *Receiver[T]) Bar(x T) {}

Also applies to: 110-118

src/core/file/fileManipulate.ts (2)

95-99: Confirm triple-quote counting across mixed-quote edge cases

The updated counting uses negative lookbehinds against the opposite quote type (e.g., (?<!["]) around '''). This works for the added tests, but mixed constructs like """'''""" on one line can still be tricky. Suggest ensuring tests cover:

  • Same-line open/close with surrounding opposite quotes
  • Embedded triple-quotes preceded by an identifier (e.g., u"""...""", r'''...'''), which should not be treated as docstrings

I can add targeted test cases under tests/core/file/fileManipulate.test.ts to lock these behaviors in. Do you want me to open a follow-up PR?


78-80: Nit: simplify negative lookbehinds for readability

The inner capturing groups inside the negative lookbehinds aren’t necessary and slightly obscure the intent. You can simplify ( ?<!(""")) to ( ?<!""") (and similarly for (''')) without changing behavior.

Apply this minor cleanup:

-    const doubleQuoteRegex = /^\s*(?<!\\)(?:""")\s*(?:\n)?[\s\S]*?(?<!("""))(?<!\\)(?:""")/gm;
-    const singleQuoteRegex = /^\s*(?<!\\)(?:''')\s*(?:\n)?[\s\S]*?(?<!('''))(?<!\\)(?:''')/gm;
+    const doubleQuoteRegex = /^\s*(?<!\\)(?:""")\s*(?:\n)?[\s\S]*?(?<!""")(?<!\\)(?:""")/gm;
+    const singleQuoteRegex = /^\s*(?<!\\)(?:''')\s*(?:\n)?[\s\S]*?(?<!''')(?<!\\)(?:''')/gm;
tests/core/file/fileManipulate.test.ts (1)

431-447: Optional: broaden Python fixtures for robustness

You already cover many tricky cases. To harden against regressions, consider adding tests for:

  • async def functions with docstrings
  • Raw/byte/Unicode prefixes before triple quotes (r"""...""", u'''...''') that are not docstrings
  • Same-line triple-quote docstrings with content: def f(): """one line"""

Happy to contribute these cases as follow-ups.

Also applies to: 449-473, 475-493

tests/core/metrics/calculateOutputMetrics.test.ts (2)

9-18: Tighten generics to avoid casts in the happy-path mock.

Small typing tweak lets you drop the as OutputMetricsTask cast and clarifies intent.

Apply this diff:

-const mockInitTaskRunner = <T, R>(_numOfTasks: number, _workerPath: string) => {
+const mockInitTaskRunner = <T extends OutputMetricsTask, R extends number>(_numOfTasks: number, _workerPath: string) => {
   return {
-    run: async (task: T) => {
-      return (await outputMetricsWorker(task as OutputMetricsTask)) as R;
+    run: async (task: T) => {
+      return (await outputMetricsWorker(task)) as R;
     },
     cleanup: async () => {
       // Mock cleanup - no-op for tests
     },
   };
 };

168-168: Remove dead local _expectedChunkSize.

The variable is computed but unused; the following assertions already validate chunk sizing.

-    const _expectedChunkSize = Math.ceil(content.length / 1000); // CHUNK_SIZE is 1000
src/core/treeSitter/parseStrategies/VueParseStrategy.ts (1)

26-26: Drop unused _normalizedChunk to avoid needless work.

This local is computed but never used; safe to remove.

-    const _normalizedChunk = chunk.trim();
package.json (1)

24-27: Split “check” vs “fix” for oxlint to avoid mutating files in CI.

Running --fix in CI can silently modify the workspace. Recommend using a no-fix script in CI and a separate :fix script for local use; keep lint chaining the no-fix variant.

   "scripts": {
@@
-    "lint": "node --run lint-biome && node --run lint-oxlint && node --run lint-ts && node --run lint-secretlint",
+    "lint": "node --run lint-biome && node --run lint-oxlint && node --run lint-ts && node --run lint-secretlint",
     "lint-biome": "biome check --write",
-    "lint-oxlint": "oxlint --fix",
+    "lint-oxlint": "oxlint",
+    "lint-oxlint:fix": "oxlint --fix",

Optional: when you’re ready to gate on warnings in CI, consider oxlint --deny-warnings (or the equivalent) in the CI job.

src/core/packager.ts (1)

34-46: Dependency injection now includes writeOutputToDisk — solid design; consider exporting a Dep type

Adding writeOutputToDisk to defaultDeps is the right move for testability and DI consistency. As a small improvement, consider exporting a type alias (e.g., export type PackDeps = typeof defaultDeps) so tests and consumers can reference the shape without importing values or relying on typeof. This keeps signatures stable and discoverable.

-const defaultDeps = {
+export const defaultDeps = {
   searchFiles,
   collectFiles,
   processFiles,
   generateOutput,
   validateFileSafety,
   writeOutputToDisk,
   copyToClipboardIfEnabled,
   calculateMetrics,
   sortPaths,
   getGitDiffs,
   getGitLogs,
 };
+export type PackDeps = typeof defaultDeps;
tests/integration-tests/packager.test.ts (1)

170-170: Avoid unnecessary I/O: remove unused expected output read

_expectedOutput is read but never used. Dropping the read reduces test time and flakiness surface without affecting assertions.

-      const _expectedOutput = await fs.readFile(expectedOutputPath, 'utf-8');
+      // No need to read expected output; assertions below check structure/content.
src/core/git/gitRemoteParse.ts (1)

67-69: Bare catch is fine; optionally log context for diagnostics

Switching to a parameterless catch silences the unused binding. If you want more observability without binding the error, consider tracing the remoteValue before throwing, or attach the original error as a cause when supported by RepomixError.

-  } catch {
-    throw new RepomixError('Invalid remote repository URL or repository shorthand (owner/repo)');
+  } catch {
+    // Optionally: logger.trace('Invalid remote value:', remoteValue);
+    throw new RepomixError('Invalid remote repository URL or repository shorthand (owner/repo)');
   }
tests/core/security/securityCheck.test.ts (1)

47-51: Optional: assert cleanup is invoked to harden the contract

Since your mock exposes a cleanup method, consider verifying it gets called when runSecurityCheck completes (success and error paths). This guards against resource leaks if the default runner evolves.

Example test addition (outside this hunk):

it('should call taskRunner.cleanup after processing', async () => {
  const cleanup = vi.fn().mockResolvedValue(undefined);
  const taskRunner = {
    run: vi.fn().mockImplementation(async (task: SecurityCheckTask) => securityCheckWorker(task)),
    cleanup,
  };
  const initTaskRunner = vi.fn(() => taskRunner);

  await runSecurityCheck(mockFiles, () => {}, undefined, undefined, { initTaskRunner });

  expect(cleanup).toHaveBeenCalledTimes(1);
});
src/core/git/gitCommand.ts (1)

185-193: Optional: tighten validation for git+ssh form (git@host:org/repo)

git@ URLs bypass structural validation beyond the dangerous-flag check. Consider a light-weight shape check to reject malformed inputs early (e.g., git@host:owner/repo(.git)?).

Sketch:

if (url.startsWith('git@')) {
  const isValidGitSsh = /^git@[A-Za-z0-9._-]+:[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+(?:\.git)?$/.test(url);
  if (!isValidGitSsh) {
    throw new RepomixError(`Invalid git+ssh URL format: ${url.replace(/:.+@/, ':***@')}`);
  }
}
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b562099 and b7fe6f2.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (74)
  • .github/workflows/ci.yml (1 hunks)
  • .oxlintrc.json (1 hunks)
  • benchmarks/memory/src/simple-memory-test.ts (1 hunks)
  • browser/scripts/generate-icons.ts (0 hunks)
  • package.json (2 hunks)
  • src/cli/actions/initAction.ts (0 hunks)
  • src/cli/cliRun.ts (1 hunks)
  • src/core/file/fileManipulate.ts (1 hunks)
  • src/core/file/fileProcess.ts (1 hunks)
  • src/core/file/workers/fileProcessWorker.ts (1 hunks)
  • src/core/git/gitCommand.ts (1 hunks)
  • src/core/git/gitHubArchive.ts (1 hunks)
  • src/core/git/gitRemoteParse.ts (2 hunks)
  • src/core/git/gitRepositoryHandle.ts (1 hunks)
  • src/core/output/outputSort.ts (1 hunks)
  • src/core/output/outputStyleDecorate.ts (1 hunks)
  • src/core/packager.ts (1 hunks)
  • src/core/security/validateFileSafety.ts (1 hunks)
  • src/core/treeSitter/loadLanguage.ts (0 hunks)
  • src/core/treeSitter/parseFile.ts (0 hunks)
  • src/core/treeSitter/parseStrategies/CssParseStrategy.ts (1 hunks)
  • src/core/treeSitter/parseStrategies/DefaultParseStrategy.ts (1 hunks)
  • src/core/treeSitter/parseStrategies/GoParseStrategy.ts (1 hunks)
  • src/core/treeSitter/parseStrategies/PythonParseStrategy.ts (1 hunks)
  • src/core/treeSitter/parseStrategies/TypeScriptParseStrategy.ts (1 hunks)
  • src/core/treeSitter/parseStrategies/VueParseStrategy.ts (2 hunks)
  • src/mcp/tools/attachPackedOutputTool.ts (0 hunks)
  • src/mcp/tools/fileSystemReadFileTool.ts (0 hunks)
  • src/mcp/tools/grepRepomixOutputTool.ts (1 hunks)
  • src/mcp/tools/readRepomixOutputTool.ts (1 hunks)
  • tests/cli/actions/defaultAction.buildCliConfig.test.ts (0 hunks)
  • tests/cli/actions/defaultAction.test.ts (0 hunks)
  • tests/cli/actions/diffsFlag.test.ts (1 hunks)
  • tests/cli/cliRun.test.ts (0 hunks)
  • tests/config/configLoad.test.ts (1 hunks)
  • tests/core/file/fileCollect.test.ts (1 hunks)
  • tests/core/file/fileManipulate.test.ts (2 hunks)
  • tests/core/file/fileProcess.test.ts (2 hunks)
  • tests/core/file/fileSearch.test.ts (0 hunks)
  • tests/core/file/fileStdin.test.ts (2 hunks)
  • tests/core/metrics/calculateMetrics.test.ts (0 hunks)
  • tests/core/metrics/calculateOutputMetrics.test.ts (6 hunks)
  • tests/core/metrics/calculateSelectiveFileMetrics.test.ts (1 hunks)
  • tests/core/output/diffsInOutput.test.ts (2 hunks)
  • tests/core/output/outputGenerateDiffs.test.ts (4 hunks)
  • tests/core/output/outputSort.test.ts (0 hunks)
  • tests/core/output/outputStyles/markdownStyle.test.ts (0 hunks)
  • tests/core/security/securityCheck.test.ts (1 hunks)
  • tests/core/treeSitter/parseFile.c.test.ts (0 hunks)
  • tests/core/treeSitter/parseFile.comments.test.ts (0 hunks)
  • tests/core/treeSitter/parseFile.cpp.test.ts (0 hunks)
  • tests/core/treeSitter/parseFile.csharp.test.ts (0 hunks)
  • tests/core/treeSitter/parseFile.css.test.ts (0 hunks)
  • tests/core/treeSitter/parseFile.go.test.ts (0 hunks)
  • tests/core/treeSitter/parseFile.java.test.ts (0 hunks)
  • tests/core/treeSitter/parseFile.javascript.test.ts (0 hunks)
  • tests/core/treeSitter/parseFile.php.test.ts (2 hunks)
  • tests/core/treeSitter/parseFile.python.test.ts (1 hunks)
  • tests/core/treeSitter/parseFile.ruby.test.ts (0 hunks)
  • tests/core/treeSitter/parseFile.rust.test.ts (0 hunks)
  • tests/core/treeSitter/parseFile.swift.test.ts (0 hunks)
  • tests/core/treeSitter/parseFile.test.ts (0 hunks)
  • tests/core/treeSitter/parseFile.typescript.test.ts (3 hunks)
  • tests/core/treeSitter/parseFile.vue.test.ts (1 hunks)
  • tests/integration-tests/packager.test.ts (4 hunks)
  • tests/mcp/tools/fileSystemReadDirectoryTool.test.ts (0 hunks)
  • tests/mcp/tools/fileSystemReadFileTool.test.ts (0 hunks)
  • tests/mcp/tools/grepRepomixOutputTool.test.ts (0 hunks)
  • tests/mcp/tools/mcpToolRuntime.test.ts (1 hunks)
  • website/client/components/utils/resultViewer.ts (1 hunks)
  • website/client/components/utils/validation.ts (1 hunks)
  • website/client/composables/useFileUpload.ts (1 hunks)
  • website/server/src/index.ts (1 hunks)
  • website/server/src/schemas/request.ts (1 hunks)
💤 Files with no reviewable changes (28)
  • tests/core/treeSitter/parseFile.go.test.ts
  • tests/core/treeSitter/parseFile.cpp.test.ts
  • src/cli/actions/initAction.ts
  • tests/core/output/outputSort.test.ts
  • src/core/treeSitter/loadLanguage.ts
  • tests/core/treeSitter/parseFile.swift.test.ts
  • src/mcp/tools/attachPackedOutputTool.ts
  • tests/core/treeSitter/parseFile.ruby.test.ts
  • tests/core/output/outputStyles/markdownStyle.test.ts
  • tests/core/treeSitter/parseFile.csharp.test.ts
  • tests/core/treeSitter/parseFile.test.ts
  • tests/core/treeSitter/parseFile.c.test.ts
  • tests/cli/actions/defaultAction.test.ts
  • tests/core/treeSitter/parseFile.rust.test.ts
  • tests/cli/actions/defaultAction.buildCliConfig.test.ts
  • tests/core/treeSitter/parseFile.css.test.ts
  • tests/mcp/tools/fileSystemReadFileTool.test.ts
  • src/core/treeSitter/parseFile.ts
  • tests/core/file/fileSearch.test.ts
  • tests/core/treeSitter/parseFile.javascript.test.ts
  • src/mcp/tools/fileSystemReadFileTool.ts
  • tests/mcp/tools/fileSystemReadDirectoryTool.test.ts
  • tests/core/treeSitter/parseFile.comments.test.ts
  • tests/core/treeSitter/parseFile.java.test.ts
  • tests/mcp/tools/grepRepomixOutputTool.test.ts
  • tests/cli/cliRun.test.ts
  • browser/scripts/generate-icons.ts
  • tests/core/metrics/calculateMetrics.test.ts
🧰 Additional context used
🧬 Code graph analysis (9)
src/core/output/outputStyleDecorate.ts (1)
src/config/configSchema.ts (1)
  • RepomixConfigMerged (164-164)
tests/core/output/outputGenerateDiffs.test.ts (1)
src/core/output/outputGeneratorTypes.ts (1)
  • RenderContext (16-37)
tests/core/output/diffsInOutput.test.ts (1)
src/core/output/outputGenerate.ts (1)
  • generateOutput (166-202)
src/core/treeSitter/parseStrategies/GoParseStrategy.ts (1)
src/core/treeSitter/parseStrategies/ParseStrategy.ts (1)
  • ParseContext (11-17)
src/core/treeSitter/parseStrategies/PythonParseStrategy.ts (1)
src/core/treeSitter/parseStrategies/ParseStrategy.ts (1)
  • ParseContext (11-17)
src/core/treeSitter/parseStrategies/CssParseStrategy.ts (1)
src/core/treeSitter/parseStrategies/ParseStrategy.ts (1)
  • ParseContext (11-17)
src/core/treeSitter/parseStrategies/TypeScriptParseStrategy.ts (1)
src/core/treeSitter/parseStrategies/ParseStrategy.ts (1)
  • ParseContext (11-17)
src/core/treeSitter/parseStrategies/DefaultParseStrategy.ts (1)
src/core/treeSitter/parseStrategies/ParseStrategy.ts (1)
  • ParseContext (11-17)
src/core/treeSitter/parseStrategies/VueParseStrategy.ts (1)
src/core/treeSitter/parseStrategies/ParseStrategy.ts (1)
  • ParseContext (11-17)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Build and run (windows-latest, 23.x)
  • GitHub Check: Build and run (macos-latest, 21.x)
  • GitHub Check: Build and run (windows-latest, 22.x)
  • GitHub Check: Test with Bun (windows-latest, latest)
🔇 Additional comments (46)
tests/core/output/outputGenerateDiffs.test.ts (1)

73-79: LGTM: underscore-prefixed unused params align with lint rules

Renaming the third mock parameter to _processedFiles is consistent with the repo’s linting convention and keeps signatures readable. Optional: if TS types allow in your setup, you could omit the unused parameter entirely in the mock implementation.

Also applies to: 141-148, 176-182, 219-226

src/core/file/workers/fileProcessWorker.ts (2)

2-2: Unused import cleanup: good call.

Dropping the unused logger import tightens the module and aligns with the PR’s oxlint objectives.


6-9: No import-time logging detected; existing log-level init is sufficient

I’ve inspected src/core/file/fileProcessContent.ts (and its dependencies in src/core/file), and found no logger.* or console.* calls at the module top level—every logging call lives inside functions or catch blocks. That means no logging occurs during static imports, so calling setLogLevelByWorkerData() at module load time already precedes any runtime logging. The proposed dynamic‐import refactor isn’t needed.

tests/cli/actions/diffsFlag.test.ts (1)

1-1: Trimmed unused Vitest import — good cleanup

Removing the unused vi binding keeps the test lean and aligned with the new linting rules. No behavior change.

tests/mcp/tools/mcpToolRuntime.test.ts (1)

5-5: Unused Vitest binding removed

Dropping the unused afterEach import is consistent with the repo-wide lint cleanup. The remaining imports reflect actual usage.

.oxlintrc.json (1)

1-6: Initial oxlint config looks good

The schema hint aids editor UX, and the integration-tests ignore is sensible to keep signal high.

website/client/components/utils/validation.ts (1)

17-17: Adopts bare catch — matches intent and avoids unused binding

Good change; behavior unchanged while satisfying lint rules.

website/client/components/utils/resultViewer.ts (1)

37-37: Regex simplification is correct

/[\/\\]/g/[/\\]/g is equivalent and clearer. No behavior change in repository name normalization.

src/core/output/outputSort.ts (1)

53-56: Optional catch binding is fully supported by the existing toolchain

All configured runtimes and compilers handle catch { … } without issue:

  • Node.js is pinned to >=20.0.0, which natively supports optional catch bindings.
  • TypeScript ^5.8.3 (in devDependencies) introduced and fully understands the catch {} syntax.
  • Compiler targets:
    • Root tsconfig (es2016) and any unspecified build target (defaulting to ES5) will compile catch {} down to a standard catch (e) {} form.
    • Other configs targeting ES2022/ESNext emit the native syntax directly.

No changes are needed here.

src/cli/cliRun.ts (1)

2-2: Removed unused Command import — LGTM

Import list is now minimal and consistent with actual usage (Option, program). No behavioral change.

tests/core/treeSitter/parseFile.python.test.ts (1)

1-1: Vitest import cleanup — LGTM

Removes unused imports and keeps the test lean. No impact on assertions.

website/server/src/index.ts (1)

14-14: Safe to remove calculateLatency import in index.ts; no dangling references

  • The import removal in website/server/src/index.ts is correct—calculateLatency wasn’t used in this file and remains intact in utils/time.ts.
  • calculateLatency is still exported (time.ts:17) and consumed by utils/logger.ts (lines 94, 126), so there are no broken or stale references.
  • formatLatencyForDisplay(startTime) is defined to take a start timestamp (number) in utils/time.ts:28, matching its usage here.
tests/core/file/fileCollect.test.ts (1)

23-32: Underscore-prefixed unused params remove lint noise without changing behavior.

The _numOfTasks and _workerPath rename is a clean way to satisfy lint rules while preserving the generic signature used by the test harness.

tests/core/treeSitter/parseFile.vue.test.ts (1)

2-2: Trimmed import set to only what’s used.

Importing only parseFile removes dead code from the test and aligns with the lint goals of this PR.

tests/core/file/fileProcess.test.ts (2)

1-1: LGTM: pruned unused vi import from vitest.

Import list now matches actual usage in this file.


22-31: LGTM: underscore-prefix for intentionally unused params.

Consistent with repo-wide lint strategy. No functional impact on the mock runner.

tests/core/metrics/calculateSelectiveFileMetrics.test.ts (1)

12-21: LGTM: underscore-prefixed unused params in mock runner.

Matches the PR’s linting strategy; no behavior change.

src/mcp/tools/grepRepomixOutputTool.ts (1)

118-128: Good adoption of optional catch binding.

The catch clause has been updated to use an empty catch block catch { } instead of binding the error parameter. This is a clean implementation that aligns with the modern JavaScript/TypeScript pattern when the error is not being used within the catch block.

src/core/treeSitter/parseStrategies/CssParseStrategy.ts (1)

5-10: Appropriate use of underscore prefix for unused parameter.

The context parameter has been correctly renamed to _context to indicate it's intentionally unused. This follows TypeScript conventions and helps with linting tools that flag unused parameters.

src/core/git/gitHubArchive.ts (1)

291-291: Minor regex escaping fix for improved clarity.

The character class in the regex has been updated from [\/\\] to [/\\] to remove unnecessary escaping of the forward slash within the character class. Both patterns are functionally equivalent, but the updated version is cleaner and aligns with modern regex best practices.

tests/config/configLoad.test.ts (2)

9-9: Clean import simplification.

The import has been correctly simplified to only include RepomixConfigValidationError, removing the unused RepomixError import. This aligns with the codebase cleanup objective of the PR.


13-22: Well-structured test mocks for logger and global directory.

The mock setup provides appropriate stubs for the logger methods (trace, note, log) and the getGlobalDirectory function. This ensures tests can run in isolation without external dependencies.

src/core/output/outputStyleDecorate.ts (1)

49-49: Proper handling of unused parameter.

The generationDate parameter has been correctly prefixed with underscore to indicate it's intentionally unused. The function signature remains intact for API compatibility while clearly marking the parameter as unused.

src/core/treeSitter/parseStrategies/PythonParseStrategy.ts (1)

22-23: Good: underscore-prefix for unused param matches lint intent

Renaming context to _context is consistent with the repo-wide convention and silences unused-parameter warnings without changing behavior.

src/core/treeSitter/parseStrategies/GoParseStrategy.ts (1)

28-29: Good: underscore-prefix for unused param

Renaming to _context is consistent with the convention adopted across parse strategies and avoids unused-parameter warnings.

src/core/file/fileManipulate.ts (1)

86-87: Regex tweak looks good and matches intent

The simplified character classes in indexSingle/indexDouble improve readability without changing semantics. This aligns with the tests you updated.

tests/core/file/fileManipulate.test.ts (2)

498-504: Test update matches new behavior—good

Switching to a literal # inside the string better reflects Python semantics and the updated hash-removal logic. Looks correct.


567-575: Test clarifies mixed-quote edge case

Adjusting to x = '""""' makes the intent explicit and avoids accidental triple-quote detection. This pairs well with the manipulator changes.

src/core/treeSitter/parseStrategies/DefaultParseStrategy.ts (1)

9-9: Underscore-prefixed context correctly signals an intentionally unused parameter.

No functional impact; aligns with the repo-wide linting convention.

src/core/treeSitter/parseStrategies/TypeScriptParseStrategy.ts (1)

28-28: Consistent unused-parameter convention.

Renaming context to _context is non-functional and keeps implementations uniform across strategies.

tests/core/metrics/calculateOutputMetrics.test.ts (4)

49-58: Error-path mock reads clearly and follows the underscore convention.

Looks good; the _task placeholder keeps lints quiet while emphasizing the throw path.


98-111: Parallel mock is straightforward and deterministic.

Good use of _task and a fixed return to make assertions simple.


125-134: Second error-path mock mirrors the first.

Consistent and clear.


150-161: Chunk-tracking mock uses the task value as intended.

No issues; this is the right place not to underscore the parameter.

src/core/treeSitter/parseStrategies/VueParseStrategy.ts (1)

9-9: Unused context rename is correct.

Keeps the method signature consistent with the interface while satisfying lint rules.

package.json (1)

112-112: Version choice looks reasonable.

Pinning to ^1.12.0 is fine; keep an eye on release notes for rule changes that could introduce new warnings.

src/core/packager.ts (2)

8-10: Import narrowing: good cleanup with no loss of type inference

Switching to function imports for git helpers and importing only ProcessedFile keeps types inferred at call sites and reduces unused types. Looks good.


124-126: Confirm writeOutputToDisk’s behavior for “no file path”/clipboard-only scenarios

Now that writing is unconditional here, please confirm writeOutputToDisk(output, config) is a no-op (or fails fast with a clear error) when config.output.filePath is absent/disabled. If it’s already handled internally, we’re good; otherwise we may want to guard the call.

tests/integration-tests/packager.test.ts (3)

33-42: Underscore-prefixed unused params: aligns with oxlint and keeps intent clear

Renaming to _numOfTasks, _workerPath is consistent with the repo-wide cleanup and avoids lint noise without changing behavior.


114-121: processFiles mock: underscore for unused callback is appropriate

Good lint-friendly rename for _progressCallback. The worker-backed processing remains faithful to production behavior for this test.


135-141: calculateMetrics signature: underscore unused params keep the contract while silencing lints

Nice alignment with the injected deps API; no logic changes.

tests/core/treeSitter/parseFile.typescript.test.ts (2)

1-1: Removed unused vi import: tidy and correct

The file doesn’t use vi; importing only the used vitest symbols is the right cleanup.


160-171: Underscore-prefixed unused parameters in mocks: matches oxlint guidance

Renaming the unused parameters in TreeCursor/Tree mocks avoids lint warnings and keeps the mock surface true to the API.

Also applies to: 176-181, 189-189

src/core/git/gitRemoteParse.ts (1)

72-79: Parameterless catch in isValidRemoteValue: LGTM

For a boolean probe, swallowing the error is expected; returning false on parse failure is correct.

src/core/security/validateFileSafety.ts (1)

4-4: Removed unused ProcessedFile import: correct and low-risk

The function only deals with RawFile[]; trimming the unused type import is the right fix.

tests/core/security/securityCheck.test.ts (1)

42-51: Underscore-prefixed unused params are correct and keep the DI signature intact — LGTM

Renaming to _numOfTasks and _workerPath silences lint while preserving the expected initTaskRunner shape used by runSecurityCheck. No behavior change.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Aug 24, 2025

Deploying repomix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 15fab4f
Status: ✅  Deploy successful!
Preview URL: https://f6ce3646.repomix.pages.dev
Branch Preview URL: https://chore-oxlint.repomix.pages.dev

View logs

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
- Add oxlint to the linting pipeline description
- Include .oxlintrc.json in configuration references
- Update verification steps to mention oxlint checks
- Clarify that auto-fixes come from both biome and oxlint
@yamadashy yamadashy merged commit 94669a0 into main Aug 24, 2025
56 checks passed
@yamadashy yamadashy deleted the chore/oxlint branch August 24, 2025 09:50
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