lbdremy/solr-node-client

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

rudolfbyker opened this issue · 3 comments

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.

Good one!

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

Yes, we definitely should.