-
-
Notifications
You must be signed in to change notification settings - Fork 10
💥 Bump eslint-plugin-svelte from 2.46.1 to 3.9.2 (#2197) #2198
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
WalkthroughThe ESLint configuration was updated to adopt the modern flat config style, removing deprecated FlatCompat usage. The Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant ESLint
participant SveltePlugin
participant TypeScriptESLint
Developer->>ESLint: Run lint
ESLint->>SveltePlugin: Apply flat config, Svelte 3.x rules
ESLint->>TypeScriptESLint: Apply updated TS rules
SveltePlugin-->>ESLint: Lint Svelte files (with new globals/rules)
TypeScriptESLint-->>ESLint: Lint TS files (with updated rules)
ESLint-->>Developer: Report results
Assessment against linked issues
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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
🧹 Nitpick comments (3)
src/lib/components/SubmissionStatus/SubmissionStatusImage.svelte (1)
30-31: Consider extracting hard-coded Japanese text for i18nThe literal
更新is now directly embedded in the markup. If you intend to support multiple locales, consider routing this through your existing i18n / translation helper instead of hard-coding the string in the component.src/routes/workbooks/[slug]/+page.svelte (1)
223-225: Minor: keep user-facing strings centrally managedThe hint “問題を1問以上登録してください。” is now an inline text node. For consistency and future localisation, route this string through the same translation / message catalogue used elsewhere in the app.
eslint.config.mjs (1)
33-35: Config order may silently override rulesPlacing
js.configs.recommendedbeforesveltePlugin’s preset means later spreads will override base JS rules.
That is fine if intended; otherwise swap the two to inherit Svelte rules on top of JS ones.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (8)
eslint.config.mjs(4 hunks)package.json(1 hunks)src/lib/components/GradeLabel.svelte(1 hunks)src/lib/components/SubmissionStatus/IconForUpdating.svelte(1 hunks)src/lib/components/SubmissionStatus/SubmissionStatusImage.svelte(1 hunks)src/routes/+error.svelte(1 hunks)src/routes/workbooks/[slug]/+page.svelte(1 hunks)src/routes/workbooks/create/+page.svelte(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: preview
🔇 Additional comments (8)
package.json (1)
49-49: Bump eslint-plugin-svelte version
Upgrades from 2.46.1 to 3.9.2 to align with the new flat config and Svelte 5 support.
Ensure you run your lint pipeline (pnpm lint) to catch any new rule or parser issues.src/routes/+error.svelte (1)
24-24: Simplify button text syntax
Switches to a direct text node for “ホームに戻る” instead of a JS expression—no logic change.src/routes/workbooks/create/+page.svelte (1)
31-31: Streamline breadcrumbTitle prop
Replaces the JS expression{'問題集を作成'}with a plain string—purely cosmetic.src/lib/components/GradeLabel.svelte (1)
49-49: Use direct minus character
Renders the minus sign (−) as a literal instead of a wrapped expression—style-only change.src/lib/components/SubmissionStatus/IconForUpdating.svelte (1)
15-15: Remove unnecessary braces around static text
Inlines “更新” directly rather than using a JS expression—no functional impact.eslint.config.mjs (3)
7-9: Missing.defaultwhen using ESM-style plugin import?
eslint-plugin-sveltepublished viaexport =in CJS; when imported usingimport sveltePlugin from 'eslint-plugin-svelte';the actual object may live underdefault.
If you encounter “Cannot read property ‘configs’ of undefined”, adjust to:-import sveltePlugin from 'eslint-plugin-svelte'; +import sveltePlugin from 'eslint-plugin-svelte'; +// for CJS default export interop: +const sveltePluginCfg = (sveltePlugin.default ?? sveltePlugin); ... -...sveltePlugin.configs['flat/recommended'], +...sveltePluginCfg.configs['flat/recommended'],
44-51: 👍 Good addition of Svelte-5 rune globals
70-80: Duplicate “unused-vars” checking
@typescript-eslint/no-unused-varsis enabled, but the base rule is disabled only later at line 78.
This is correct, just highlighting that ESLint will still report the base rule until it is hit by the override. No change required.
KATO-Hiro
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.
LGTM
close #2197
Summary by CodeRabbit
Refactor
Style