We’re using sonarqube and facing issue in typescript code.
For all the imports that are from dependencies in package.json, we’re getting Dependencies should be explicit code smell. Ideally, it shouldn’t be coming for dependencies from package.json. Can you help us understand why we’re facing this issue? It is coming for all the dependencies in package.json.
Hi,
Thanks for reverting on my issue. Sonarqube version: Version 8.9.6. As I mentioned, issue is coming for all the import statements which are importing node module dependencies. All of these are mentioned in package.json. It’s coming even for simple react import. All the other checks are working fine as expected.
If you could point me to where I can look for resolving the issue, it would be helpful.
There have been a number of fixes to this rule since SonarQube v8.9 LTS (here are a few). Can you please upgrade to the current supported LTS version (9.9) and let us know if you still face an issue?