Skip to content

all: Readd prefer-arrow and prefer-const rules (connects #9082) - #10252

Open
paulbert wants to merge 1 commit into
masterfrom
9082-prefer-arrow-const
Open

all: Readd prefer-arrow and prefer-const rules (connects #9082)#10252
paulbert wants to merge 1 commit into
masterfrom
9082-prefer-arrow-const

Conversation

@paulbert

@paulbert paulbert commented Aug 6, 2026

Copy link
Copy Markdown
Member

Readding two more rules: prefer-arrow and prefer-const. prefer-arrow seems like another preference, but good to keep things consistent.

I'm not seeing any fixes for prefer-const, so that one we're following already I think.

connects #9082

Summary by CodeRabbit

  • Refactor

    • Standardized TypeScript functions to use arrow-function syntax and const declarations.
    • Existing application behavior, file processing, charting, database access, PDF loading, and query utilities remain unchanged.
  • Chores

    • Enabled ESLint rules to enforce preferred arrow functions and constant declarations.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 769eade1-91fd-4909-b64d-413401810e43

📥 Commits

Reviewing files that changed from the base of the PR and between 6c3ea09 and 3fbc664.

📒 Files selected for processing (11)
  • .eslintrc.json
  • eslint.config.mjs
  • src/app/home/home-router.module.ts
  • src/app/resources/resources-add.component.ts
  • src/app/shared/chart-utils.ts
  • src/app/shared/database/pouch.service.ts
  • src/app/shared/forms/planet-markdown-textbox.component.spec.ts
  • src/app/shared/mangoQueries.ts
  • src/app/shared/pdf.service.ts
  • src/app/shared/table-helpers.ts
  • src/app/shared/zip-utils.ts

📝 Walkthrough

Walkthrough

ESLint now enforces arrow functions and const declarations. Affected local, private, exported, callback, and test helper functions were converted without behavior changes.

Changes

ESLint arrow function migration

Layer / File(s) Summary
Rule activation
.eslintrc.json, eslint.config.mjs
Enabled prefer-arrow/prefer-arrow-functions and prefer-const as error-level rules.
Application and shared helper conversions
src/app/home/..., src/app/resources/..., src/app/shared/...
Converted affected functions, callbacks, private methods, and exported utilities to const arrow functions. Existing parameters, return types, and behavior remain unchanged.

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

Possibly related PRs

Suggested reviewers: mutugiii

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the readdition of the prefer-arrow and prefer-const rules, which is the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 9082-prefer-arrow-const

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.

ctx.fillText(message, canvas.width / 2, canvas.height / 2);
return canvas.toDataURL('image/png');
}
};;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

minor nit: stray semicolon

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