-
-
Notifications
You must be signed in to change notification settings - Fork 256
ci: Fix inconsistent lint errors #7078
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46eeeb9 to
c40a10a
Compare
4 tasks
Gudahtt
added a commit
that referenced
this pull request
Nov 7, 2025
## Explanation This file is a duplicate of another in the `src` directory of this package, and is never referenced. The TSConfig file assumes there is no TypeScript outside of the `src` directory, so this fixes an error encountered on a different branch when adjusting the ESlint config. ## References Fixed error on PR #7078 ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs), highlighting breaking changes as necessary - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Remove unused duplicate `packages/eip1193-permission-middleware/types.ts` containing enum type definitions. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 3f9f909. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
c40a10a to
9361157
Compare
@typescript-eslint option projectServiced40fb73 to
280ceaf
Compare
Gudahtt
added a commit
that referenced
this pull request
Nov 7, 2025
The `tsconfig.json` file for `claims-controller` was extending from the wrong file, and was referencing the wrong configurations in other packages. This caused lint errors locally in my editor, and in the PR #7078 where we are updating how type information is read by the linter. The issue was that the `tsconfig.build.json` files were being referenced, which exclude test code and test files.
4 tasks
Gudahtt
added a commit
that referenced
this pull request
Nov 7, 2025
## Explanation The `tsconfig.json` file for `claims-controller` was extending from the wrong file, and was referencing the wrong configurations in other packages. This caused lint errors locally in my editor, and in the PR #7078 where we are updating how type information is read by the linter. The issue was that the `tsconfig.build.json` files were being referenced, which exclude test code and test files. ## References The error was introduced in #7072 ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs), highlighting breaking changes as necessary - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Switches `claims-controller` to the correct `tsconfig` base, updates package references to non-build configs, and includes tests in type checking. > > - **TypeScript config (`packages/claims-controller/tsconfig.json`)**: > - Extend from `../../tsconfig.packages.json` instead of `../../tsconfig.packages.build.json`. > - Update project references to `../{base-controller,messenger,profile-sync-controller}/tsconfig.json` (replacing `tsconfig.build.json`). > - Expand `include` to add `./tests` alongside `../../types` and `./src`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 26ad4a9. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
280ceaf to
550429a
Compare
Update the ESLint config for `typescript-eslint` to use the newer `projectService` setting rather than `project`. This seems to fix the problem we've been seeing recently with inconsistent lint results between machines, and it's recommended by the maintainers of this plugin, and it's the default in our shared ESLint config. We had originally disabled this setting because we were running into OOM errors, but these no longer occur after updating to TypeScript 5.3.
550429a to
837ce13
Compare
Gudahtt
commented
Nov 7, 2025
| ], | ||
| "files": [], | ||
| "include": ["./types"] | ||
| "include": ["./types", "./scripts"] |
Member
Author
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.
There was just one gap in tsconfig.json coverage, the top-level scripts.
mcmire
approved these changes
Nov 7, 2025
Contributor
mcmire
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!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation
Update the ESLint config for
typescript-eslintto use the newerprojectServicesetting rather thanproject. This seems to fix the problem we've been seeing recently with inconsistent lint results between machines, and it's recommended by the maintainers of this plugin, and it's the default in our shared ESLint config.We had originally disabled this setting because we were running into OOM errors, but these no longer occur after updating to TypeScript 5.3.
References
N/A
Checklist
Note
Switch ESLint TypeScript config to rely on projectService, update repo-wide ESLint warning thresholds, and include the scripts directory in the root tsconfig.
**/*.tsrules, removeparserOptions.projectand disabledprojectServiceto rely on projectService defaults.eslint-warning-thresholds.jsonwith updated warning counts across many packages (e.g.,@typescript-eslint/no-misused-promises,@typescript-eslint/no-unsafe-enum-comparison, etc.)."./scripts"to roottsconfig.jsonincludearray.Written by Cursor Bugbot for commit 837ce13. This will update automatically on new commits. Configure here.