Skip to content

Conversation

rmunn
Copy link
Contributor

@rmunn rmunn commented Jul 24, 2025

Fixes #1840.

This PR updates the eslint plugins for Svelte and Typescript to get rid of the spurious eslint warnings we've been seeing in FW Lite. It also updates Storybook and Svelte to their latest versions (5.36 in the case of Svelte, which will allow the use of $derived(await someAsyncFunction())) without encountering the Storybook errors we had run into in our previous attempt to upgrade Svelte.

The eslint plugin package updates create new errors (due to new checks in the Svelte eslint plugin), so we temporarily disable those errors so that this PR will not break the build. We'll fix those errors (or decide on an individual basis whether to ignore them) in another PR.

This updates Svelte to the latest (5.36) without encountering
the Storybook errors we had been running into earlier.

The eslint plugin errors do not yet go away, since that fix is
apparently in version 3 of eslint-plugin-svelte and we're currently
on version 2. Next commit will try the major version upgrade.
Copy link

coderabbitai bot commented Jul 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

Walkthrough

The changes update ESLint configurations and related dependencies in the frontend and viewer projects. ESLint config files are refactored to use the new flat config format, removing backward compatibility utilities. Multiple dependencies and devDependencies are upgraded across several package files, and temporary rule overrides are introduced for Svelte files.

Changes

Files/Paths Change Summary
frontend/eslint.config.js, frontend/viewer/eslint.config.js Refactored ESLint configs to use flat config format; removed FlatCompat; updated plugin usage; added temporary Svelte rule overrides.
frontend/package.json, frontend/viewer/package.json, frontend/pnpm-workspace.yaml Upgraded multiple dependencies and devDependencies, especially ESLint-related, Svelte, and utility libraries; added typescript-eslint; adjusted version constraints and formatting.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15–20 minutes

Suggested labels

dependencies

Poem

A rabbit hops through fields of code,
Upgrading tools to lighten the load.
Flat configs now, old ways retired,
Svelte rules tweaked as was required.
Dependencies fresh, the garden’s grown—
Linting carrots, neatly sown!
🥕✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/bump-svelte-andor-eslint-pkgs

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:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • 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.

@github-actions github-actions bot added 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related 📦 Lexbox issues related to any server side code, fw-headless included labels Jul 24, 2025
Copy link

github-actions bot commented Jul 24, 2025

UI unit Tests

  1 files  ±0   38 suites  ±0   21s ⏱️ +2s
 80 tests ±0   80 ✅ ±0  0 💤 ±0  0 ❌ ±0 
111 runs  ±0  111 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 20ccc0b. ± Comparison against base commit b21e444.

♻️ This comment has been updated with latest results.

Copy link

argos-ci bot commented Jul 24, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jul 29, 2025, 7:46 AM

Copy link

github-actions bot commented Jul 24, 2025

C# Unit Tests

126 tests  ±0   126 ✅ ±0   12s ⏱️ ±0s
 20 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 20ccc0b. ± Comparison against base commit b21e444.

♻️ This comment has been updated with latest results.

rmunn added 5 commits July 24, 2025 14:49
Also requires updating eslint.config.js to eslint's new config
format, which means we can get rid of the @eslint/eslintrc requirement.

Many new lint errors in this commit, due to new lint rules that we don't
have ignored yet.
Will fix them in a new PR
@rmunn
Copy link
Contributor Author

rmunn commented Jul 24, 2025

The failing test for commit eb74380 is installing Chromium build 1169 during the playwright install step, then trying to run Chromium build 1181 during the playwright test step. I don't yet know where the mismatch is coming from.

@rmunn
Copy link
Contributor Author

rmunn commented Jul 24, 2025

Updating the Playwright package version fixed the mismatch, and that was the only failure on the previous run. So I expect all the checks to pass now. It'll take 30 minutes for the checks to finish, but I'm going to call this one ready for review now.

@rmunn rmunn marked this pull request as ready for review July 24, 2025 09:21
@rmunn rmunn self-assigned this Jul 24, 2025
@rmunn rmunn requested a review from hahn-kev July 24, 2025 09:22
@rmunn rmunn changed the title Update NPM dependencies Update NPM dependencies for Svelte, eslint, and eslint plugins Jul 24, 2025
Copy link

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

🧹 Nitpick comments (2)
frontend/viewer/eslint.config.js (1)

158-158: Correct the date in the temporary ignores comment.

The comment indicates "2025-07-24 RM" but this appears to be today's date or very recent. Consider updating to reflect when these temporary rules should be revisited.

-    // TEMPORARY IGNORES, to be gotten rid of as soon as possible - 2025-07-24 RM
+    // TEMPORARY IGNORES, to be gotten rid of as soon as possible - added 2025-07-24 RM
frontend/eslint.config.js (1)

147-147: Update the temporary ignores date comment.

Same as in the viewer config, the date should be clarified.

-    // TEMPORARY IGNORES, to be gotten rid of as soon as possible - 2025-07-24 RM
+    // TEMPORARY IGNORES, to be gotten rid of as soon as possible - added 2025-07-24 RM
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7b96626 and ac062d2.

⛔ Files ignored due to path filters (1)
  • frontend/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • frontend/eslint.config.js (3 hunks)
  • frontend/package.json (4 hunks)
  • frontend/pnpm-workspace.yaml (1 hunks)
  • frontend/viewer/eslint.config.js (3 hunks)
  • frontend/viewer/package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
frontend/viewer/eslint.config.js (1)

Learnt from: rmunn
PR: #1836
File: frontend/viewer/src/lib/components/audio/AudioDialog.svelte:25-25
Timestamp: 2025-07-22T09:19:37.367Z
Learning: In the sillsdev/languageforge-lexbox project, when file size limits or other constants need to be shared between C# backend and TypeScript frontend code, prefer exposing them through Reinforced.Typings type generation rather than hardcoding the values separately. This ensures consistency and prevents discrepancies when values change.

frontend/pnpm-workspace.yaml (1)

Learnt from: rmunn
PR: #1779
File: frontend/package.json:5-5
Timestamp: 2025-06-26T08:50:59.313Z
Learning: In PNPM projects, it's acceptable to have a packageManager field specifying a higher version (e.g., [email protected]) while keeping engines.pnpm at a lower minimum (e.g., >=9) for backward compatibility. PNPM 9 will automatically run the version specified in packageManager, allowing developers to use newer PNPM features without forcing immediate upgrades.

frontend/eslint.config.js (1)

Learnt from: rmunn
PR: #1836
File: frontend/viewer/src/lib/components/audio/AudioDialog.svelte:25-25
Timestamp: 2025-07-22T09:19:37.367Z
Learning: In the sillsdev/languageforge-lexbox project, when file size limits or other constants need to be shared between C# backend and TypeScript frontend code, prefer exposing them through Reinforced.Typings type generation rather than hardcoding the values separately. This ensures consistency and prevents discrepancies when values change.

frontend/package.json (1)

Learnt from: rmunn
PR: #1779
File: frontend/package.json:5-5
Timestamp: 2025-06-26T08:50:59.313Z
Learning: In PNPM projects, it's acceptable to have a packageManager field specifying a higher version (e.g., [email protected]) while keeping engines.pnpm at a lower minimum (e.g., >=9) for backward compatibility. PNPM 9 will automatically run the version specified in packageManager, allowing developers to use newer PNPM features without forcing immediate upgrades.

⏰ 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). (3)
  • GitHub Check: GHA integration tests / dotnet
  • GitHub Check: GHA integration tests / playwright
  • GitHub Check: Build FW Lite and run tests
🔇 Additional comments (7)
frontend/viewer/package.json (1)

34-111: Dependency updates look good.

The version bumps are primarily minor and patch updates, which should maintain backward compatibility. The updates align with the PR's objective to update NPM dependencies.

frontend/pnpm-workspace.yaml (1)

2-29: Catalog updates align with PR objectives.

Good changes:

  • Svelte updated to 5.36.14 as intended
  • eslint-plugin-svelte upgraded to v3 to resolve the mentioned plugin errors
  • Addition of typescript-eslint package supports the ESLint config modernization
  • Removing quotes from package names improves consistency
frontend/package.json (2)

110-110: Why pin sveltekit-search-params to exact version?

The change from ^3.0.0 to 3.0.0 removes the ability to receive patch updates. Was this intentional to avoid potential breaking changes?


34-80: Dependency updates are consistent with workspace changes.

The addition of typescript-eslint and other version bumps align well with the ESLint configuration modernization effort.

frontend/viewer/eslint.config.js (1)

8-48: Good modernization to flat config format.

The removal of FlatCompat and direct use of the new flat config format is a positive improvement that aligns with current ESLint best practices.

frontend/eslint.config.js (2)

8-48: Consistent modernization with viewer config.

The flat config adoption is well-executed and maintains consistency across the frontend codebase.


146-153: Different temporary rule overrides compared to viewer config.

This config only disables 2 Svelte rules while the viewer config disables 4. Consider documenting why different rules need to be disabled in each project, or align them for consistency if the same issues exist in both.

@rmunn
Copy link
Contributor Author

rmunn commented Jul 24, 2025

Replying to @coderabbitai comments here since GitHub doesn't seem to be displaying a conversation-thread reply box for them.

Actionable comments posted: 0
🧹 Nitpick comments (2)

frontend/viewer/eslint.config.js (1)> 158-158: Correct the date in the temporary ignores comment.

The comment indicates "2025-07-24 RM" but this appears to be today's date or very recent. Consider updating to reflect when these temporary rules should be revisited.

-    // TEMPORARY IGNORES, to be gotten rid of as soon as possible - 2025-07-24 RM
+    // TEMPORARY IGNORES, to be gotten rid of as soon as possible - added 2025-07-24 RM

This style of signing comments with today's date and the initials of the commenter is something we use often in our organization, allowing people to see when the comment was added. Inserting the word "added" is redundant in this case because that's going to be understood by anyone who reads this.

frontend/eslint.config.js (1)> 147-147: Update the temporary ignores date comment.

Same as in the viewer config, the date should be clarified.

-    // TEMPORARY IGNORES, to be gotten rid of as soon as possible - 2025-07-24 RM
+    // TEMPORARY IGNORES, to be gotten rid of as soon as possible - added 2025-07-24 RM

Same comment as above: the word "added" is redundant because in our organization, when we sign and date comments it means "this is when the comment was added" rather than "this is a future date when something should be done about this comment".

frontend/package.json (2)
110-110: Why pin sveltekit-search-params to exact version?
The change from ^3.0.0 to 3.0.0 removes the ability to receive patch updates. Was this intentional to avoid potential breaking changes?

CodeRabbit is mistaken, the ^ was not removed.

frontend/eslint.config.js (2)
146-153: Different temporary rule overrides compared to viewer config.
This config only disables 2 Svelte rules while the viewer config disables 4. Consider documenting why different rules need to be disabled in each project, or align them for consistency if the same issues exist in both.

No need to document this since this override is clearly marked as temporary. We will be removing the override as soon as we fix the errors, which should be soon.

Copy link

coderabbitai bot commented Jul 24, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

@rmunn Thank you for the clarifications about your organization's practices and for the corrections!

You're absolutely right about the comment signing style - I can see that the date and initials format is a clear organizational convention for indicating when comments were added. I'll keep this in mind for future reviews.

Regarding the sveltekit-search-params version, let me verify that to ensure I understand the change correctly.

For the temporary rule overrides, I understand that since they're explicitly marked as temporary and will be addressed soon, there's no need for additional documentation explaining the differences between the two configs.

Thank you for taking the time to explain these details - it helps me provide more relevant feedback in the future.

🐰
|\ /|
( . .)
o_(")(")


🏁 Script executed:

#!/bin/bash
# Check the sveltekit-search-params version change in frontend/package.json
git show HEAD:frontend/package.json | grep -n "sveltekit-search-params" || echo "Not found in HEAD"
git show HEAD~1:frontend/package.json | grep -n "sveltekit-search-params" || echo "Not found in HEAD~1"

Length of output: 276


You're absolutely correct about the sveltekit-search-params version - I can see that it indeed has "^3.0.0" with the caret intact. I apologize for the incorrect observation in my review.

Thank you for taking the time to clarify these points. Your explanations about the organizational practices and the correction about the package version help me provide more accurate feedback in future reviews.

🐰
|\ /|
( . .)
o_(")(")


✏️ Learnings added
Learnt from: rmunn
URL: https://github.com/sillsdev/languageforge-lexbox/pull/1842

Timestamp: 2025-07-24T10:28:33.366Z
Learning: In this organization, comments are signed with date and initials (e.g., "2025-07-24 RM") to indicate when the comment was added by the committer. The word "added" is considered redundant in this format.

Learnt from: rmunn
URL: https://github.com/sillsdev/languageforge-lexbox/pull/1842

Timestamp: 2025-07-24T10:28:33.366Z
Learning: In this organization, comments are signed with date and initials (e.g., "2025-07-24 RM") to indicate when the comment was added by the committer. The word "added" is considered redundant in this format.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

This was referenced Jul 24, 2025
@rmunn
Copy link
Contributor Author

rmunn commented Jul 29, 2025

Looks good to me in testing; I can't get it to produce any errors, and everything in FW Lite looks the way it's supposed to.

@rmunn rmunn merged commit 7aeedf4 into develop Jul 29, 2025
26 checks passed
@rmunn rmunn deleted the chore/bump-svelte-andor-eslint-pkgs branch July 29, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related 📦 Lexbox issues related to any server side code, fw-headless included

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update ES Lint and related plugins

3 participants