Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Align ESLint, Prettier packages and configs with core monorepo ahead of migration #28

Merged
merged 7 commits into from
Sep 28, 2023

Conversation

MajorLift
Copy link
Contributor

@MajorLift MajorLift commented Sep 25, 2023

Description

  • This PR aligns the ESLint and Prettier packages and configs in this repo with the core monorepo.
  • This is a preparation step for migrating the eth-json-rpc-provider package into the core monorepo.
  • Originally, the plan was to decrement the TypeScript version to align with the core monorepo, but following this discussion, we've opted to use TypeScript version v4.8.4, and preserve the compiler options in this package that aren't enabled in the core monorepo.

References

Next Steps

- match compiler options with core monorepo
  - passes all tests

Closes #1682
…norepo

- added: `eslint-plugin-promise`
- removed: `eslint-plugin-node`

See: MetaMask/core#1683
- added `eslint-import-resolver-typescript` v2.5.0 as dependency

See: MetaMask/core#1683
@MajorLift MajorLift requested a review from a team as a code owner September 25, 2023 18:50
@socket-security
Copy link

socket-security bot commented Sep 25, 2023

@Mrtenz
Copy link
Member

Mrtenz commented Sep 25, 2023

See my comments on #27.

@MajorLift MajorLift force-pushed the 230925-migrate-to-monorepo-deps-linter-configs branch from 0c07937 to f1fcb2b Compare September 25, 2023 21:18
@socket-security
Copy link

socket-security bot commented Sep 25, 2023

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: which@3.0.1, nopt@6.0.0, @lavamoat/aa@3.1.5

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

@MajorLift
Copy link
Contributor Author

@SocketSecurity ignore which@3.0.1
@SocketSecurity ignore nopt@6.0.0
@SocketSecurity ignore @lavamoat/aa@3.1.5

@MajorLift MajorLift marked this pull request as draft September 26, 2023 15:39
@MajorLift MajorLift marked this pull request as ready for review September 26, 2023 16:07
@MajorLift MajorLift self-assigned this Sep 26, 2023
@MajorLift MajorLift added enhancement New feature or request dependencies Pull requests that update a dependency file labels Sep 26, 2023
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

"@types/node": "^16.18.39",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"@types/node": "^16.18.24",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: The devDeps being dropped here are inversely pending bumps in core here: MetaMask/core#1740

@MajorLift MajorLift merged commit aab4c50 into main Sep 28, 2023
31 checks passed
@MajorLift MajorLift deleted the 230925-migrate-to-monorepo-deps-linter-configs branch September 28, 2023 16:33
MajorLift added a commit to MetaMask/core that referenced this pull request Oct 2, 2023
## Explanation

This is the first of two PRs that will migrate
[`eth-json-rpc-provider`](https://github.com/MetaMask/eth-json-rpc-provider)
into the core monorepo by following these steps:
#1079 (comment).

- This PR focuses on migrating the git history of the original package. 
- `eth-json-rpc-provider` is moved into a temporary directory in core
(`merged-packages/`) with git history fully intact.
- The second PR will remove the `merged-packages/` directory and
integrate `eth-json-rpc-provider` into the `packages/` directory,
resolving any issues arising from applying core monorepo
linter/compiler/build settings to the newly added package.
  
## Blocked by
- [x] MetaMask/eth-json-rpc-provider#29

## References

- Partially implements #1551
- See MetaMask/eth-json-rpc-provider#28 for
preparatory steps taken in original repo.

## Changelog

N/A since `@metamask/eth-json-rpc-provider` isn't usable from the
monorepo as of this PR.

## 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 highlighted breaking changes using the "BREAKING" category
above as appropriate

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: Alex Donesky <alex.donesky@consensys.net>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: legobt <6wbvkn0j@anonaddy.me>
Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update packages and configs for eslint and prettier Migrate Typescript to ~4.6.3
4 participants