Skip to content

fix: resolve lint errors from eslint-plugin-llm-core 0.8.0#26

Merged
pertrai1 merged 1 commit into
mainfrom
fix/lint-errors-llm-core-0.8.0
Apr 4, 2026
Merged

fix: resolve lint errors from eslint-plugin-llm-core 0.8.0#26
pertrai1 merged 1 commit into
mainfrom
fix/lint-errors-llm-core-0.8.0

Conversation

@pertrai1

@pertrai1 pertrai1 commented Apr 4, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes lint errors surfaced by upgrading eslint-plugin-llm-core from 0.6.0 to 0.8.0.

Changes

  • scanner.ts — Extract 11 magic Unicode code points to named constants (llm-core/no-magic-numbers)
  • parser.ts — Add explicit : number type annotation on lineNumber default param (llm-core/explicit-export-types)
  • eslint.config.mjs — Set ignoreParameters: true on @typescript-eslint/no-inferrable-types to resolve conflict with llm-core/explicit-export-types; extract complexity threshold to named constant

Rule conflict

llm-core/explicit-export-types requires type annotations on exported function params, but @typescript-eslint/no-inferrable-types (from @nx/eslint-plugin flat/typescript) forbids annotations when the type is trivially inferred from a default value. Reported upstream: pertrai1/eslint-plugin-llm-core#71

Verification

  • npx nx affected -t build,test,lint passes (0 errors, 264 tests green)

Summary by CodeRabbit

  • Refactor

    • Refactored internal code structure for improved maintainability and type safety.
  • Chores

    • Enhanced linting and code quality configuration standards.

- Extract magic Unicode code points to named constants (no-magic-numbers)
- Add explicit type annotation on exported function default param (explicit-export-types)
- Set ignoreParameters on no-inferrable-types to resolve rule conflict
- Extract complexity threshold to named constant

Ref: pertrai1/eslint-plugin-llm-core#71
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Apr 4, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dd202704-f15c-4d2a-bd95-16fff23114e7

📥 Commits

Reviewing files that changed from the base of the PR and between e1827f1 and 54e1ff3.

📒 Files selected for processing (3)
  • eslint.config.mjs
  • packages/pipeline/src/lib/helper/scanner.ts
  • packages/pipeline/src/lib/roadmap/parser.ts

📝 Walkthrough

Walkthrough

This PR refines ESLint configuration by introducing a MAX_CYCLOMATIC_COMPLEXITY constant and enabling TypeScript type inference rules, while refactoring invisible Unicode codepoint definitions into named constants and adding explicit type annotation to a function parameter.

Changes

Cohort / File(s) Summary
ESLint Configuration
eslint.config.mjs
Introduces MAX_CYCLOMATIC_COMPLEXITY constant (set to 10) and adds new TypeScript rule @typescript-eslint/no-inferrable-types with ignoreParameters: true configuration.
Code Clarity and Type Annotation
packages/pipeline/src/lib/helper/scanner.ts, packages/pipeline/src/lib/roadmap/parser.ts
Extracts hard-coded Unicode code point values into named constants for readability; adds explicit number type annotation to parseTask's lineNumber parameter.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related issues

  • Issue #3: The ESLint configuration changes introducing MAX_CYCLOMATIC_COMPLEXITY and @typescript-eslint/no-inferrable-types rules directly address the linting errors that motivated the explicit type annotation in parser.ts, resolving the root cause.

Poem

🐰 Constants bloom where numbers hid,
Unicode points in order bid,
Types made clear, no guessing game,
A rabbit's code now walks with fame! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main objective of the PR: resolving lint errors from a specific eslint plugin version upgrade.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/lint-errors-llm-core-0.8.0

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.

@nx-cloud

nx-cloud Bot commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit 54e1ff3

Command Status Duration Result
nx run-many -t lint test build typecheck ✅ Succeeded 47s View ↗
nx-cloud record -- npx nx format:check --base=r... ✅ Succeeded 3s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-04 16:34:07 UTC

@pertrai1
pertrai1 merged commit ec3f0b0 into main Apr 4, 2026
2 checks passed
@pertrai1
pertrai1 deleted the fix/lint-errors-llm-core-0.8.0 branch April 4, 2026 17:46
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