🧹 fix(lint): configure ESLint to allow img tags in BusinessCard#123
🧹 fix(lint): configure ESLint to allow img tags in BusinessCard#123
Conversation
- Configured `eslint.config.mjs` to disable `@next/next/no-img-element` rule for `BusinessCard` and `cardRenderer` components. - Removed inline `eslint-disable-next-line` comments for cleaner code. - Maintained usage of standard `<img>` tags required for correct `html-to-image` rendering. Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Review Summary by QodoConfigure ESLint to allow img tags in BusinessCard
WalkthroughsDescription• Configured ESLint to disable @next/next/no-img-element rule for specific files • Removed inline eslint-disable-next-line comments from components • Maintains standard <img> tags required for html-to-image rendering Diagramflowchart LR
A["ESLint Config"] -->|"disable rule for files"| B["eslint.config.mjs"]
B -->|"applies to"| C["BusinessCard.tsx"]
B -->|"applies to"| D["cardRenderer.tsx"]
C -->|"remove comment"| E["Clean img tag"]
D -->|"remove comment"| F["Clean img tag"]
File Changes1. eslint.config.mjs
|
Code Review by Qodo
1. Brittle ESLint file override
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 21 minutes and 41 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughウォークスルーESLint設定をリファクタリングし、インラインの抑止コメントをファイルレベルのコンフィグオーバーライドに移行しました。 変更内容
推定レビュー作業量🎯 1 (Trivial) | ⏱️ ~3分 ラビットの詩
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Code Review
This pull request centralizes the ESLint configuration by moving the '@next/next/no-img-element' rule override from inline comments to the global configuration file for specific components. Feedback suggests extending this override to include the OG image route to ensure consistency across the codebase where standard img tags are required.
eslint.config.mjs
Outdated
| ...nextVitals, | ||
| ...nextTs, | ||
| { | ||
| files: ["src/components/BusinessCard.tsx", "src/lib/cardRenderer.tsx"], |
There was a problem hiding this comment.
The src/app/api/og/[username]/route.tsx file also utilizes standard <img> tags for dynamic image generation (via ImageResponse). To ensure consistency across the project and prevent potential linting errors in similar image-rendering contexts, it should be included in this override list.
| files: ["src/components/BusinessCard.tsx", "src/lib/cardRenderer.tsx"], | |
| files: ["src/components/BusinessCard.tsx", "src/lib/cardRenderer.tsx", "src/app/api/og/[username]/route.tsx"], |
|
Closing as stale/superseded: this lint cleanup branch now conflicts with current main and overlaps with later card-rendering refactors. |
Understood. Acknowledging that this work is now obsolete and stopping work on this task. |
🎯 What: Configured
eslint.config.mjsto disable the@next/next/no-img-elementrule forsrc/components/BusinessCard.tsxandsrc/lib/cardRenderer.tsxand removed inline suppression comments.💡 Why:
BusinessCardandcardRendererexplicitly require standard<img>tags (rather than Next.js<Image />tags) for thehtml-to-imagerendering engine to work correctly. Disabling the rule in the global configuration for these files avoids noisy inlineeslint-disablecomments. This improves code readability and maintainability.✅ Verification: Verified by running
npx eslint src/components/BusinessCard.tsx src/lib/cardRenderer.tsxwith no warnings, and confirmed no test regressions or build errors vianpm run test -- --runandnpm run build.✨ Result: Clean code health with consistent lint configuration and no lint suppression comments cluttering the codebase.
PR created automatically by Jules for task 5884096278838244657 started by @is0692vs