-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix yarn and eslint warnings (#1597)
Closes https://linear.app/0xparc-pcd/issue/0XP-238 Closes https://linear.app/0xparc-pcd/issue/0XP-239 We have various warnings on `yarn install`, mostly relating to missing or incorrect peer dependencies. Some of these were because of mismatches between expected package versions and the installed versions, and were solved by upgrading the dependant packages so that the dependencies match their expected version ranges (mostly upgrading `eslint` to 8.x). In addition, various `@opentelemetry` packages had mismatches in their dependency versions, which has been solved by pinning to specific compatible versions rather than allowing yarn to install newer but potentially incompatible dependencies. In other cases, it was necessary to install packages as `devDependencies` so that the peer package would stop complaining about a missing `peerDependency`. This is odd, as no functional issues seemed to arise from this, but it seems like the correct thing to do is to install the missing dependency. As a result of upgrading `eslint`, the fact that `anon-message-client` lacks an `eslintrc.js` or equivalent config file became a problem, as `yarn lint` would hang while prompting the user to decide what to do about this. So, I added a configuration file, which means that `yarn lint` now actually runs for `anon-message-client`. This threw up some simple linting issues (e.g. missing function return types) which I fixed. Finally, I took the opportunity to make the version number explicit on the `@pcd/eslint-config-custom` and `@pcd/tsconfig` dependencies throughout the codebase. Previously we were generally using `'*'` as the version number, but this was flagged as an issue [here](https://github.com/proofcarryingdata/zupass/pull/1564/files#r1524098374). The result is that *most* of the warnings have gone away. The following ones remain: ``` warning "workspace-aggregator-e02a239c-4952-405a-abbd-87259c138f94 > passport-client > [email protected]" has incorrect peer dependency "react@^16.8.0 || ^17.0.0". warning "workspace-aggregator-e02a239c-4952-405a-abbd-87259c138f94 > passport-client > [email protected]" has incorrect peer dependency "react-dom@^16.8.0 || ^17.0.0". ``` The incorrect peer dependency for `react-qr-reader` comes from the fact that `react-qr-reader` expects a maximum React version of `^17.0.0`, and we are on `18.2.x`. There is an unmerged PR for this in the `react-qr-reader` repo from November, which looks like it would resolve the issue if merged: JodusNodus/react-qr-reader#361
- Loading branch information
Showing
66 changed files
with
1,325 additions
and
572 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
extends: ["@pcd/eslint-config-custom"], | ||
root: true, | ||
}; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.