SonarJS
SonarJS copied to clipboard
Enable S4328 (`no-implicit-dependencies `) for JavaScript
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
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
this rule is not in the sonar way - low priority