korbit-ai[bot] commented on code in PR #35159:
URL: https://github.com/apache/superset/pull/35159#discussion_r2360283453


##########
superset-frontend/src/types/files.d.ts:
##########
@@ -19,3 +19,6 @@
 
 declare module '*.svg';
 declare module '*.gif';
+declare module '*.png';
+declare module '*.jpg';
+declare module '*.jpeg';

Review Comment:
   ### Redundant Image Module Declarations <sub>![category 
Design](https://img.shields.io/badge/Design-0d9488)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   Multiple similar image module declarations are defined separately, violating 
the DRY principle and making the code less maintainable.
   
   
   ###### Why this matters
   If new image formats need to be supported in the future, developers would 
need to add new declarations one by one, increasing the chance of 
inconsistencies and making maintenance more difficult.
   
   ###### Suggested change ∙ *Feature Preview*
   Combine all image declarations into a single, more maintainable declaration 
using a union type:
   ```typescript
   declare module '*.(svg|gif|png|jpg|jpeg)' {
     const content: string;
     export default content;
   }
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/c8ed481e-3172-459a-8dca-4af6019c7ca1/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/c8ed481e-3172-459a-8dca-4af6019c7ca1?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/c8ed481e-3172-459a-8dca-4af6019c7ca1?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/c8ed481e-3172-459a-8dca-4af6019c7ca1?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/c8ed481e-3172-459a-8dca-4af6019c7ca1)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:29c8a2f3-255b-4fa3-90b9-b1b7a55f9896 -->
   
   
   [](29c8a2f3-255b-4fa3-90b9-b1b7a55f9896)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to