Validator.js: Minor issue: validator isn't detected with VSCode IntelliCode

Created on 1 Mar 2020  路  4Comments  路  Source: validatorjs/validator.js

First of all, thank you for the great work with maintaining this.

Just one minor issue I'm encountering:
Usually intellicode seamlessly detects & autocompletes available props on any imported package. With this one, it doesn't detect any autocomplete options at all, which is kind of unusual.

Importing with ES5 syntax: const validator = require("validator")

And it does work as expected, just no intellicode detection/autocomplete.

Any insights as to what might be the culprit here?

help wanted 馃攳needs-investigation

Most helpful comment

As a temporary solution, Intellisense is working if you use it like validator.default.isEmail() you can see the functions etc. after default. For example check pic below.

https://imgur.com/d0matNI

I'm having same issue on another module as well. So there is a chance that this might be VS Code problem rather than validator's.

All 4 comments

As a temporary solution, Intellisense is working if you use it like validator.default.isEmail() you can see the functions etc. after default. For example check pic below.

https://imgur.com/d0matNI

I'm having same issue on another module as well. So there is a chance that this might be VS Code problem rather than validator's.

@Ravaj The workaround you mentioned works for me. Thanks. I'll let the maintainers decide if this should be closed or not, I'll keep it open until they take action on it.

Sure, we can close this for now; but will keep a close eye if we have a recurrence.

Same problem here, I suggest this as workaround:

const { default: validator } = require('validator');

avoid the validator.default.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

frontendmonster picture frontendmonster  路  4Comments

IOAyman picture IOAyman  路  4Comments

rubiin picture rubiin  路  3Comments

zilahir picture zilahir  路  3Comments

jaxkodex picture jaxkodex  路  3Comments