-
Notifications
You must be signed in to change notification settings - Fork 35
Add Playground Safety Detector feature #350
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -23,7 +23,9 @@ export default defineConfig([ | |||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||
| rules: { | ||||||||||||||||||||||||||||||||||
| 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }], | ||||||||||||||||||||||||||||||||||
| 'no-unused-vars': ['warn', { varsIgnorePattern: '^[A-Z_]' }], | ||||||||||||||||||||||||||||||||||
| 'no-undef': 'warn', | ||||||||||||||||||||||||||||||||||
| 'react-hooks/exhaustive-deps': 'warn', | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+26
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major Weakening lint rules globally to fix a build failure is risky — prefer fixing the violations instead. Downgrading
Consider keeping ♻️ Suggested approach: scope overrides to new files only rules: {
- 'no-unused-vars': ['warn', { varsIgnorePattern: '^[A-Z_]' }],
- 'no-undef': 'warn',
+ 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
'react-hooks/exhaustive-deps': 'warn',
},
},
+ {
+ files: ['src/PlaygroundDetector.jsx', 'src/components/*.jsx'],
+ rules: {
+ 'no-unused-vars': ['warn', { varsIgnorePattern: '^[A-Z_]' }],
+ 'no-undef': 'warn',
+ },
+ },
])Better yet, fix the actual lint errors in the new components so no rule relaxation is needed. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||
| ]) | ||||||||||||||||||||||||||||||||||
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.
This endpoint duplicates raw
await image.read()/ error handling. Most other image endpoints in this router useprocess_uploaded_image(image)for standardized validation/optimization. Consider switching to that helper here as well to keep behavior consistent and reduce maintenance overhead.