Whitelisting "Dependencies should be explicit" rule

Im getting the below error and I need to whitelist the rule “Dependencies should be explicit” which is in “Sonar way recommended” under Quality Profiles. But Im not able to find any documentation that says how to do use “whitelist” property.
Error -
Dependencies should be explicitly listed in the package.json file. Importing a module that is not declared as a dependency makes it an implicit one and is bound to create problems.

Hi,

Welcome to the community!

What language are we talking about? I guess this is JavaScript or TypeScript?

And what do you mean by whitelist? Are you just wanting to turn the rule off? If so, just make a copy of the profile (you’ll find it under the cog menu on the Quality Profiles page) and remove the rule from your copy.

 
HTH,
Ann

Thank you and yes Im talking about typescript. I’m attaching the snapshot of the whitelist parameter.

Hi,

Okay, to change the parameter values, I think you’ll still need to make a copy of the profile & edit in the copy.

 
HTH,
Ann