Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (93)
💤 Files with no reviewable changes (3)
✅ Files skipped from review due to trivial changes (86)
🚧 Files skipped from review as they are similar to previous changes (3)
WalkthroughMigrates ESLint configuration from Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
BundleMonFiles updated (9)
Unchanged files (7)
Total files change +1.12KB +0.02% Groups updated (2)
Unchanged groups (1)
Final result: ✅ View report in BundleMon website ➡️ |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
src/containers/App.spec.jsx (2)
32-34: Avoid unknown DOM props in mock output to drop lint suppression.At Line 32-34,
konnectorandtriggersprops are passed to a native<div>. Preferdata-*attributes to keep the mock explicit withoutreact/no-unknown-propertysuppression.Proposed tweak
- HarvestRoutes: ({ konnector, triggers, onDismiss }) => ( - // eslint-disable-next-line react/no-unknown-property - <div konnector={konnector} triggers={triggers} onClick={onDismiss}> + HarvestRoutes: ({ konnector, triggers, onDismiss }) => ( + <div + data-konnector={konnector?.slug} + data-triggers-count={triggers?.length ?? 0} + onClick={onDismiss} + > {konnector.slug} </div> )🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/containers/App.spec.jsx` around lines 32 - 34, Replace the unknown DOM props on the test mock div by using data-* attributes: change the <div konnector={konnector} triggers={triggers} onClick={onDismiss}> to use data-konnector (e.g., data-konnector={konnector.slug} or JSON.stringify(konnector) if needed) and data-triggers={JSON.stringify(triggers)} and keep onClick={onDismiss} as-is; remove the eslint-disable-next-line react/no-unknown-property since the unknown-prop issue will be resolved.
3-3: Importactfromreactinstead of the deprecatedreact-dom/test-utils.In React 18+,
actfromreact-dom/test-utilsis deprecated. Useimport { act } from 'react'instead. Alternatively, if this import is unused, remove it entirely—React Testing Library utilities already wrap inactby default.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/containers/App.spec.jsx` at line 3, The test imports act from the deprecated 'react-dom/test-utils'; change the import to use act from 'react' (i.e., import { act } from 'react') or remove the import entirely if unused since React Testing Library wraps updates in act automatically—update the import statement referencing act in App.spec.jsx accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@eslint.config.mjs`:
- Around line 1-3: Replace the direct spread of cozyAppReact by wrapping the
legacy config with FlatCompat from "@eslint/eslintrc" (use FlatCompat({}) and
compat.extend/flatten) instead of spreading cozyAppReact, then add an "settings"
block to configure the import resolver for TypeScript aliases (ensure
eslint-plugin-import and eslint-import-resolver-typescript are installed and
configure import/resolver to map "@/": ["src"] or equivalent) and add an
"overrides" entry targeting "*.spec.jsx" and "*.test.jsx" that defines Jest
globals (describe, it, test, expect, beforeEach, afterEach, etc.) so the legacy
react config works in flat-config mode and alias imports and Jest globals are
recognized.
In `@package.json`:
- Around line 96-97: The package.json dependency pins "eslint": "^10.0.0" and
"eslint-config-cozy-app": "^7.0.0" are incompatible (ESLint v10 requires flat
config while eslint-config-cozy-app v6.x uses legacy .eslintrc), so either pin
compatible versions (e.g., change "eslint" to a 9.x range and
"eslint-config-cozy-app" to "6.7.2"), or confirm and upgrade to a cozy-app
release that explicitly supports ESLint flat config, or switch to using
FlatCompat in your ESLint setup (create/modify eslint.config.js to wrap the
legacy config via FlatCompat) so CI/dev linting does not break.
---
Nitpick comments:
In `@src/containers/App.spec.jsx`:
- Around line 32-34: Replace the unknown DOM props on the test mock div by using
data-* attributes: change the <div konnector={konnector} triggers={triggers}
onClick={onDismiss}> to use data-konnector (e.g.,
data-konnector={konnector.slug} or JSON.stringify(konnector) if needed) and
data-triggers={JSON.stringify(triggers)} and keep onClick={onDismiss} as-is;
remove the eslint-disable-next-line react/no-unknown-property since the
unknown-prop issue will be resolved.
- Line 3: The test imports act from the deprecated 'react-dom/test-utils';
change the import to use act from 'react' (i.e., import { act } from 'react') or
remove the import entirely if unused since React Testing Library wraps updates
in act automatically—update the import statement referencing act in App.spec.jsx
accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d9a7d915-7906-4b69-85e1-9f634354d71a
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (93)
.eslintrc.jsoneslint.config.mjspackage.jsonsrc/components/AddServiceTile.jsxsrc/components/AddTile.jsxsrc/components/AnimatedWrapper.jsxsrc/components/AppHighlightAlert/AppHighlightAlertWrapper.jsxsrc/components/AppHighlightAlert/BackupAppHighlightAlert.jsxsrc/components/AppHighlightAlert/helpers.spec.jssrc/components/AppTile.jsxsrc/components/AppTile.spec.jsxsrc/components/AppWrapper.jsxsrc/components/AppWrapper.spec.jsxsrc/components/Applications.jsxsrc/components/Applications.spec.jsxsrc/components/ApplicationsAndServices.jsxsrc/components/Assistant/AssistantDesktopWrapper.jsxsrc/components/Assistant/AssistantMobileWrapper.jsxsrc/components/AssistantTile.jsxsrc/components/BackupNotification/BackupNotification.jsxsrc/components/BackupNotification/ConfirmStopBackupDialog.jsxsrc/components/DefaultRedirectionSnackbar/DefaultRedirectionSnackbar.jsxsrc/components/DefaultRedirectionSnackbar/DefaultRedirectionSnackbar.spec.jsxsrc/components/DefaultRedirectionSnackbar/useIncrementDefaultRedirectionViewCount.jssrc/components/DefaultRedirectionSnackbar/useIncrementDefaultRedirectionViewCount.spec.jssrc/components/EntrypointLink.jsxsrc/components/Failure.jsxsrc/components/FooterLogo/FooterLogo.jsxsrc/components/FooterLogo/FooterLogo.spec.jsxsrc/components/HeroHeader/Corner.jsxsrc/components/HeroHeader/Corner.spec.jsxsrc/components/HeroHeader/CornerButton.jsxsrc/components/HeroHeader/LogoutButton.jsxsrc/components/HeroHeader/SettingsButton.jsxsrc/components/HeroHeader/index.jsxsrc/components/Home.jsxsrc/components/IntentRedirect.jsxsrc/components/Konnector.jsxsrc/components/Konnector.spec.jsxsrc/components/KonnectorHeaderIcon.jsxsrc/components/KonnectorTile.jsxsrc/components/KonnectorTile.spec.jsxsrc/components/LogoutTile.jsxsrc/components/MainView.jsxsrc/components/MoveModal.jsxsrc/components/MoveModal.spec.jsxsrc/components/Personalization/PersonalizationModal.jsxsrc/components/Personalization/PersonalizationWrapper.jsxsrc/components/Personalization/ThemeSwitcher.jsxsrc/components/Personalization/Wallpaper.jsxsrc/components/Personalization/WallpaperItem.jsxsrc/components/Personalization/constants.jssrc/components/Services.jsxsrc/components/Services.spec.jsxsrc/components/ShortcutLink.jsxsrc/components/ShortcutLink.spec.jsxsrc/components/Shortcuts/ShortcutActionsMenu.jsxsrc/components/Shortcuts/ShortcutCreateModal.jsxsrc/components/Shortcuts/ShortcutEditModal.jsxsrc/components/Shortcuts/ShortcutsView.jsxsrc/components/Shortcuts/ShortcutsView.spec.jsxsrc/components/StoreRedirection.jsxsrc/components/appEntryPoint.jsxsrc/containers/App.jsxsrc/containers/App.spec.jsxsrc/containers/IntentHandler.jsxsrc/containers/IntentService.jsxsrc/containers/ReloadFocus.jsxsrc/containers/toFlagNames.jssrc/hooks/useBinaryWallpaper.jsxsrc/hooks/useFetchInitialData.jsxsrc/hooks/useRegistryInformation.jsxsrc/hooks/useWallpaper.jsxsrc/lib/sentry.jssrc/reducers/index.jssrc/store/configureStore.jssrc/targets/browser/index.test.jsxsrc/targets/intents/KonnectorRoutes.jsxsrc/targets/intents/index.jsxsrc/targets/services/attributesHelpers.jssrc/targets/services/cliskTimeout.jssrc/targets/services/deleteAccounts.jssrc/targets/services/myselfFromIdenties.jssrc/targets/services/polyfillFetch.jssrc/targets/services/polyfillFetch.spec.jssrc/targets/services/softDeleteOrRestoreAccounts.jssrc/targets/services/sourceAccountIdentifierNormalizer.jssrc/targets/services/sourceAccountIdentifierNormalizerHelper.jssrc/targets/services/updateAccounts.jstest/AppLike.jsxtest/__mocks__/cozy-keys-lib/index.jstest/components/Failure.spec.jstest/lib/konnectors.spec.js
💤 Files with no reviewable changes (3)
- src/lib/sentry.js
- test/lib/konnectors.spec.js
- .eslintrc.json
No keeping the custom import-alias rule that was only present in cozy-home. Other rules are aready default.
No code change.
1bb9818 to
1f9118e
Compare
Summary by CodeRabbit
Chores
Style