-
-
Notifications
You must be signed in to change notification settings - Fork 262
chore: Notification controller eslint cleanup #7479
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
chore: Notification controller eslint cleanup #7479
Conversation
Co-authored-by: prithpal.sooriya <[email protected]>
|
Cursor Agent can help with this pull request. Just |
core
Outdated
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.
@cursor remove this 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.
|
@cursor update the |
|
Done! I've completed both requests:
## [Unreleased]
### Changed
- Improve code quality by adding explicit return types and ESLint compliance ([#7479](https://github.com/MetaMask/core/pull/7479))The changes have been committed and pushed to the PR. This should also fix the "Check changelog" CI failure since the changelog now includes the changes made in this PR. Learn more about Cursor Agents |
- Remove accidentally committed core dump file - Update changelog with ESLint cleanup entry for PR #7479
|
@cursor please remove the changelog changes, as these eslint changes does not impact the implementation |
|
Done! I've removed the changelog entry for this PR. The ESLint cleanup changes are internal code quality improvements that don't affect the implementation, so they don't need to be documented in the changelog. Learn more about Cursor Agents |
ESLint cleanup changes don't impact implementation and don't need to be documented in the changelog.
77a6ab1
…ion-controller-eslint-cleanup-e4db
77a6ab1 to
f839f3c
Compare
…ion-controller-eslint-cleanup-e4db
Explanation
This PR addresses ESLint suppressions in
packages/notification-services-controlleras part of the ASSETS-2100 cleanup initiative.@typescript-eslint/explicit-function-return-type,id-length, and@typescript-eslint/naming-convention. These suppressions needed to be resolved to improve code quality and consistency.perp-notifications.ts, thecreatePerpOrderNotificationfunction now has an explicitPromise<void>return type, and the catch block variableewas renamed toerrorto satisfyid-length.notification-api.tsandschema.ts, file-leveleslint-disable @typescript-eslint/naming-conventioncomments were added.eslint-disablecomments fornaming-conventionare intentional.schema.tsis an auto-generated file from an OpenAPI specification, andnotification-api.tsdefines types directly derived from an external Notification API, both of which dictate their own naming conventions (e.g., snake_case) that cannot be changed without breaking compatibility or manual intervention that would be overwritten.References
Checklist
Note
Removes ESLint suppressions by adding an explicit return type and standardizing error variable in
perp-notifications.ts, adding file-levelnaming-conventiondisables to API-derived type files, and updatingeslint-suppressions.json.services/perp-notifications.ts: Add explicitPromise<void>return type tocreatePerpOrderNotification; rename catch variable toerror.types/notification-api/notification-api.ts: Add file-leveleslint-disable @typescript-eslint/naming-conventionwith note about external schema.types/notification-api/schema.ts: Add file-leveleslint-disable @typescript-eslint/naming-conventionand auto-generated file note.eslint-suppressions.jsonto remove entries for the above files.Written by Cursor Bugbot for commit 8ddabd4. This will update automatically on new commits. Configure here.