-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
chore: Add a meta.name to the eslint plugin. #6463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for actualbudget-website canceled.
|
WalkthroughAdds a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Areas to focus on:
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/eslint-plugin-actual/lib/index.js (1)
2-4: Consider reading meta.name from package.json instead of hardcoding it.While the hardcoded value 'eslint-plugin-actual' correctly matches your package name and follows ESLint naming conventions, the recommended approach is to read name and version from package.json dynamically. This keeps metadata synchronized with your package definition and prevents duplication.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/eslint-plugin-actual/lib/index.js(1 hunks)upcoming-release-notes/6463.md(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,js,jsx}: Use TypeScript for all code
Use descriptive variable names with auxiliary verbs (e.g., 'isLoaded', 'hasError')
Use named exports for components and utilities; avoid default exports except in specific cases
Use functional and declarative programming patterns - avoid classes
Use the 'function' keyword for pure functions
Structure files with: exported component/page, helpers, static content, types
Organize imports in the following order: React imports, built-in Node.js modules, external packages, Actual packages, parent imports, sibling imports, index imports, with newlines between groups
Never use 'console.*' - use logger instead (enforced by ESLint rule 'actual/prefer-logger-over-console')
Never import from 'uuid' without destructuring - use 'import { v4 as uuidv4 } from 'uuid''
Files:
packages/eslint-plugin-actual/lib/index.js
🧠 Learnings (6)
📚 Learning: 2025-09-30T00:28:46.031Z
Learnt from: lelemm
Repo: actualbudget/actual PR: 5786
File: packages/plugins-core/src/types/actualPluginManifest.ts:10-10
Timestamp: 2025-09-30T00:28:46.031Z
Learning: The `ActualPluginManifest` interface in packages/plugins-core/src/types/actualPluginManifest.ts must be used with DOM contexts and requires the `plugin?: Blob` field to remain as Blob type.
Applied to files:
packages/eslint-plugin-actual/lib/index.js
📚 Learning: 2025-12-20T22:55:54.021Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 6462
File: .oxlintrc.json:22-27
Timestamp: 2025-12-20T22:55:54.021Z
Learning: The `actual/prefer-logger-over-console` ESLint rule in packages/eslint-plugin-actual only enforces logger usage in files within `packages/loot-core/src/server` directory. Files outside this path are not checked by this rule, even when the rule is enabled globally in .oxlintrc.json.
Applied to files:
packages/eslint-plugin-actual/lib/index.js
📚 Learning: 2024-11-26T13:07:02.794Z
Learnt from: lelemm
Repo: actualbudget/actual PR: 3891
File: packages/loot-core/src/shared/rules.ts:209-212
Timestamp: 2024-11-26T13:07:02.794Z
Learning: The file `packages/loot-core/src/shared/rules.ts` is not yet translated, so internationalization using the `t()` function is not required here.
Applied to files:
packages/eslint-plugin-actual/lib/index.js
📚 Learning: 2025-11-25T22:34:13.068Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 6158
File: packages/desktop-client/src/components/mobile/schedules/MobileSchedulesPage.tsx:124-124
Timestamp: 2025-11-25T22:34:13.068Z
Learning: The ESLint rule `actual/prefer-logger-over-console` (which requires using logger instead of console.* methods) only applies to the packages/api package. In other packages like desktop-client and sync-server, using console methods (console.error, console.log, etc.) is acceptable.
Applied to files:
packages/eslint-plugin-actual/lib/index.js
📚 Learning: 2025-10-12T04:00:51.978Z
Learnt from: lelemm
Repo: actualbudget/actual PR: 5786
File: packages/plugins-core/vite.config.mts:27-35
Timestamp: 2025-10-12T04:00:51.978Z
Learning: In the Actual Budget plugins architecture, the actual-app/plugins-core package is designed to be self-contained. Plugin authors should only need to install actual-app/plugins-core, which bundles the internal monorepo packages (actual-app/shared-types, actual-app/query, actual-app/components) at build time. Only common dependencies like React, React-DOM, and i18next are kept as peerDependencies/externals to avoid duplication with the host application.
Applied to files:
packages/eslint-plugin-actual/lib/index.js
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Never use 'console.*' - use logger instead (enforced by ESLint rule 'actual/prefer-logger-over-console')
Applied to files:
packages/eslint-plugin-actual/lib/index.js
⏰ 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: web
- GitHub Check: validate-cli
- GitHub Check: test
- GitHub Check: Analyze
🔇 Additional comments (1)
upcoming-release-notes/6463.md (1)
1-6: LGTM!The release notes accurately describe the maintenance change and follow the expected format.
The glob library is different from what ESLint uses, so the globs need a bit of adjustment.
There was a problem hiding this 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
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.oxlintrc.json(2 hunks)
🧰 Additional context used
🧠 Learnings (9)
📓 Common learnings
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 5936
File: packages/desktop-electron/package.json:95-102
Timestamp: 2025-10-16T14:46:14.026Z
Learning: In the actualbudget/actual repository, PR #5936 (Electron bump to 38.3.0 and electron/notarize to 3.1.0) is coordinated with PR #5937, which handles the Node.js version migration (dropping Node 20 support, requiring Node 22+ for Electron compatibility).
📚 Learning: 2025-10-12T04:07:06.002Z
Learnt from: lelemm
Repo: actualbudget/actual PR: 5786
File: packages/api/tsconfig.dist.json:14-14
Timestamp: 2025-10-12T04:07:06.002Z
Learning: In the Actual Budget codebase, when rootDir is removed from packages/loot-core/tsconfig.api.json to allow referencing files outside the loot-core directory, the declaration output structure changes. The path alias for loot-core in packages/api/tsconfig.dist.json must be updated from "./types/loot-core/src/*" to "./types/loot-core/loot-core/src/*" to match the new emitted declaration paths, as TypeScript preserves the full directory structure from the project root when rootDir is not specified.
Applied to files:
.oxlintrc.json
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to packages/loot-core/src/**/*.{ts,tsx,js,jsx} : Don't directly reference platform-specific imports (.api, .web, .electron) - use conditional exports in loot-core for platform-specific code
Applied to files:
.oxlintrc.json
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Organize imports in the following order: React imports, built-in Node.js modules, external packages, Actual packages, parent imports, sibling imports, index imports, with newlines between groups
Applied to files:
.oxlintrc.json
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to packages/loot-core/src/**/*.{ts,tsx,js,jsx} : Never import 'actual-app/web/*' in 'loot-core' package
Applied to files:
.oxlintrc.json
📚 Learning: 2025-12-20T22:55:54.021Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 6462
File: .oxlintrc.json:22-27
Timestamp: 2025-12-20T22:55:54.021Z
Learning: The `actual/prefer-logger-over-console` ESLint rule in packages/eslint-plugin-actual only enforces logger usage in files within `packages/loot-core/src/server` directory. Files outside this path are not checked by this rule, even when the rule is enabled globally in .oxlintrc.json.
Applied to files:
.oxlintrc.json
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to **/*.{tsx,jsx} : Don't use 'React.*' patterns - use named imports instead
Applied to files:
.oxlintrc.json
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to **/*.{ts,tsx} : Use inline type imports: 'import { type MyType } from '...''
Applied to files:
.oxlintrc.json
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to **/*.{tsx,jsx} : Never import colors directly - use theme instead
Applied to files:
.oxlintrc.json
⏰ 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: validate-cli
- GitHub Check: test
- GitHub Check: web
- GitHub Check: Analyze
🔇 Additional comments (1)
.oxlintrc.json (1)
317-317: Pattern change correctly broadens platform-specific import restriction scope.The change from
*.api/*.web/*.electronto**/*.api/**/*.web/**/*.electronappropriately expands the eslint/no-restricted-imports rule to match platform-specific imports at any directory depth, not just the root level. This aligns with the guideline against directly referencing platform-specific imports—the codebase should use conditional exports instead. No existing violations were found.
| }, | ||
| { | ||
| "group": ["@actual-app/web/*"], | ||
| "group": ["@actual-app/web/**/*"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check for @actual-app/web imports in loot-core
echo "=== Checking for @actual-app/web imports in loot-core ==="
rg -n "from ['\"]@actual-app/web" packages/loot-core/ --type-add 'source:*.{ts,tsx,js,jsx}' --type source 2>/dev/null || echo "No matches found"
# Also check the pattern syntax in .oxlintrc.json to confirm it exists and is valid
echo -e "\n=== Verifying .oxlintrc.json content around line 331 ==="
sed -n '325,340p' .oxlintrc.jsonRepository: actualbudget/actual
Length of output: 774
Fix the architectural boundary violation: @actual-app/web import in loot-core
The expanded pattern correctly catches a violation at packages/loot-core/src/platform/client/undo/index.ts:3, where @actual-app/web/src/modals/modalsSlice is imported into loot-core. This violates the architectural boundary preventing loot-core from importing web code. The import must be removed or refactored to use conditional exports in loot-core instead.
🤖 Prompt for AI Agents
.oxlintrc.json around line 331: the glob pattern is catching an architectural
boundary violation where loot-core imports @actual-app/web
(packages/loot-core/src/platform/client/undo/index.ts:3). Remove the direct
import from loot-core and instead refactor by either (a) moving the shared
functionality into a common package that both web and loot-core can depend on,
or (b) exposing a conditional export or abstraction API from loot-core that web
can implement/use so loot-core does not import web code; update the offending
file to use the refactored API or the common package, and verify the linter no
longer reports the violation.
MatissJanis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
commit 99b491def07e8628d5a3b2d918be8de14c101041
Author: Will Smidlein <will@willsmidlein.com>
Date: Sun Dec 21 17:56:09 2025 -0700
Add nested category support with parent_id field
Introduces nested categories by adding a parent_id field to the categories table, updating schema, models, and API to support parent-child relationships. Enforces group consistency, cycle prevention, and a maximum nesting depth. Updates category creation, update, and deletion logic to handle nested structures, including reparenting and promoting children. Adds migration, reconciliation logic, and comprehensive tests for nested category behaviors. Updates UI to display unparented categories and reflect nested structures.
commit f738fefc17d2b8ebced029d70c986f9702e81d02
Author: Roberto Carlos Gomez Araque <111466948+rcgomezap@users.noreply.github.com>
Date: Sun Dec 21 12:39:01 2025 -0500
Fix for issue actualbudget#1253 (Budget can't be balanced when "Hide decimal places" in the setting is on) (actualbudget#6274)
* Fix number formatting of intlFormatter with a wrapper to handle -0 edge case (actualbudget#1253)
* Fix Normalize integer currency values in makeBalanceAmountStyle function based on formatting user prefs (actualbudget#1253)
* [autofix.ci] apply automated fixes
* Add release notes for budget balancing issue when "Hide decimal places" is enabled
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
commit 9a8473d64d8fca7eba89cb5ce39c65fce36b2464
Author: Matiss Janis Aboltins <matiss@mja.lv>
Date: Sun Dec 21 13:25:00 2025 +0000
lint: add react/jsx-boolean-value lint rule (actualbudget#6464)
commit 34c4d5596690f9cf7cfabaf0552f3520c00b7518
Author: Connor Shea <connor.james.shea@gmail.com>
Date: Sun Dec 21 01:33:22 2025 -0700
chore: Add a meta.name to the eslint plugin. (actualbudget#6463)
* Add a name to the eslint plugin.
* Add release note.
* Also update the no-restricted-imports patterns in .oxlintrc.json.
The glob library is different from what ESLint uses, so the globs need
a bit of adjustment.
commit e16b43d9d2f554fd1c5f1a8278efffe8082865b4
Author: Will Smidlein <will@willsmidlein.com>
Date: Sun Dec 21 17:56:23 2025 -0700
Use mise
Noticed this'll break when you upgrade oxlint if this isn't done (noticed with https://github.com/oxc-project/oxc-ecosystem-ci/actions/runs/20404230629/job/58631736649), so figured I'd contribute that :)
Also fix the config for the glob patterns in the no-restricted-imports rule. Noticed this by running
yarn oxlint --report-unused-disable-directives-severity=errorand taking a look at the directives that were unnecessarily-disabled. oxlint uses rust fast-glob for glob matching generally, and so the*character matches everything except/separators. And so you'd be missing files nested under directories with the previous glob.Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.