SonarJS icon indicating copy to clipboard operation
SonarJS copied to clipboard

Enable S4328 (`no-implicit-dependencies `) for JavaScript

Open saberduck opened this issue 4 years ago • 2 comments

It seems we could enable S4328 also for JavaScript projects, there is nothing TypeScript specific for this rule.

We should also make sure that rule works when package.json is missing. It would be also nice to elaborate a bit more about this rule in the https://jira.sonarsource.com/browse/RSPEC-4328 , Compliant / Noncompliant samples are missing

saberduck avatar Oct 28 '20 17:10 saberduck

It seems we could enable S4328 also for JavaScript projects, there is nothing TypeScript specific for this rule.

We should also make sure that rule works when package.json is missing. It would be also nice to elaborate a bit more about this rule in the https://jira.sonarsource.com/browse/RSPEC-4328 , Compliant / Noncompliant samples are missing

Please check this piece of code which may not pass then

https://github.com/ReactTraining/react-router/blob/master/FAQ.md#how-do-i-access-the-history-object-outside-of-components

here we don't want to specify a version of history because we want to use the same one as used by react-router so that there is no conflict

https://codesandbox.io/s/owQ8Wrk3?file=/package.json

krreet avatar Oct 29 '20 06:10 krreet

this rule is not in the sonar way - low priority

ilia-kebets-sonarsource avatar Oct 19 '23 14:10 ilia-kebets-sonarsource