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.
Need Help:
Above dependency need to be imported in individual files. Ask is to ignore this rule within code base. We have approx. 150 developers working on multiple projects with the same parent project. So //NoSonar will not work.
We do have a sonar file with some exclusions like
“sonar.test.inclusions”: "${relDirname}/**/__tests__/**",
“sonar.exclusions”:
“**/*.abc.tsx, **/jest.config.js, /abc-api/”,
Please suggest the format to add a line to ignore typescript:S4328 or any other way.
Thanks in advance,
Sowmya
To do that navigate to Administration > General Settings > Analysis Scope > Issues and scroll down to the section “Ignore Issues on Multiple Criteria” - you should be able to enter something like the image shown below.
I believe that this setting can only be set in the UI.
The other approach would be to remove this rule from the Quality Profile, but I think your initial instinct to ignore the issue raised during analysis in a more targeted way is probably better.
I hope that helps, let me know if you have any other questions.