-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Disallow using require
for imports
#405
Merged
Merged
Conversation
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 depends upon #404 |
Gudahtt
force-pushed
the
no-require-imports
branch
from
March 17, 2021 14:28
098e1e8
to
e7ed83e
Compare
Gudahtt
force-pushed
the
es-module-interop
branch
from
March 17, 2021 16:38
f457e5f
to
487a5aa
Compare
Gudahtt
force-pushed
the
no-require-imports
branch
from
March 17, 2021 16:39
e7ed83e
to
b3ac466
Compare
Gudahtt
force-pushed
the
es-module-interop
branch
from
March 19, 2021 03:15
487a5aa
to
0fc4561
Compare
Gudahtt
force-pushed
the
no-require-imports
branch
from
March 19, 2021 12:48
b3ac466
to
b2cf355
Compare
rickycodes
previously approved these changes
Mar 19, 2021
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
Gudahtt
force-pushed
the
no-require-imports
branch
from
March 19, 2021 15:11
b2cf355
to
c582df0
Compare
The ESLint rules `@typescript-eslint/no-require-imports` and `@typescript-eslint/no-var-requires` have been re-enabled, which prevents using `require` to import modules. We have been using `require` in this codebase primarily to avoid the warning from TypeScript about each dependency that lacks types. That warning has been adding an empty declaration for each third-party module we use that lacks types. Effectively this declares them as type `any`. The `ethjs-util` dependency has also been added to fix type errors resulting from using the methods from `ethjs-util` that were re- exported by `ethereumjs-util`. The errors were caused by incomplete types provided by `ethereumjs-util` (they were missing the re-exported functions). We're using the exact same version that was being used transitively, so this should not result in any functional change.
Gudahtt
force-pushed
the
no-require-imports
branch
from
March 19, 2021 16:30
c582df0
to
28922aa
Compare
NiranjanaBinoy
approved these changes
Mar 19, 2021
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
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
The ESLint rules `@typescript-eslint/no-require-imports` and `@typescript-eslint/no-var-requires` have been re-enabled, which prevents using `require` to import modules. We have been using `require` in this codebase primarily to avoid the warning from TypeScript about each dependency that lacks types. That warning has been adding an empty declaration for each third-party module we use that lacks types. Effectively this declares them as type `any`. The `ethjs-util` dependency has also been added to fix type errors resulting from using the methods from `ethjs-util` that were re- exported by `ethereumjs-util`. The errors were caused by incomplete types provided by `ethereumjs-util` (they were missing the re-exported functions). We're using the exact same version that was being used transitively, so this should not result in any functional change.
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
The ESLint rules `@typescript-eslint/no-require-imports` and `@typescript-eslint/no-var-requires` have been re-enabled, which prevents using `require` to import modules. We have been using `require` in this codebase primarily to avoid the warning from TypeScript about each dependency that lacks types. That warning has been adding an empty declaration for each third-party module we use that lacks types. Effectively this declares them as type `any`. The `ethjs-util` dependency has also been added to fix type errors resulting from using the methods from `ethjs-util` that were re- exported by `ethereumjs-util`. The errors were caused by incomplete types provided by `ethereumjs-util` (they were missing the re-exported functions). We're using the exact same version that was being used transitively, so this should not result in any functional change.
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.
The ESLint rule
@typescript-eslint/no-require-imports
has been re-enabled, which prevents usingrequire
to import modules. We have been usingrequire
in this codebase primarily to avoid the warning from TypeScript about each dependency that lacks types. That warning has been adding an empty declaration for each third-party module we use that lacks types. Effectively this declares them as typeany
.