Skip to content
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

Using dynamic require instead of import in tests hides typescript errors. #282

Closed
rudolfbyker opened this issue Aug 30, 2021 · 3 comments · Fixed by #288
Closed

Using dynamic require instead of import in tests hides typescript errors. #282

rudolfbyker opened this issue Aug 30, 2021 · 3 comments · Fixed by #288
Assignees

Comments

@rudolfbyker
Copy link
Collaborator

The tests use require('...') to import from the library, and it's using a dynamically calculated variable from the environment to determine the path. This is hiding a lot of Typescript errors that currently exist in the tests.

@rudolfbyker rudolfbyker self-assigned this Aug 30, 2021
@kibertoad
Copy link
Collaborator

Good one!

@rudolfbyker
Copy link
Collaborator Author

I have a feeling we should replace ALL requires with imports, and remove '@typescript-eslint/no-var-requires': 'off', from the eslint config.

@kibertoad
Copy link
Collaborator

Yes, we definitely should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants