How to effectively work with Typescript monorepos?

Hi Adam,

Welcome to the community!

  • Can we create a Quality Profile in a file as part of our project (instead of using the web application)?

Nope. UI only.

  • How to integrate SonarCloud with the SonarLint plugin? We’ve installed it in VisualStudio code but we’re not sure how they work together.

Check this out: Connected Mode · SonarSource/sonarlint-visualstudio Wiki · GitHub

  • How to differentiate between source files and unit tests (*.spec.js)? We have *.spec.js and *.spec.ts files for each module as unit tests. How can we apply different rulesets to them (source vs unit test)?

You can set analysis scope parameters. Have a look here: How do SonarCloud properties work in relation to each other?

  • Can we have a Quality Profile for each project in our monorepo?

Projects in monorepos are still separate SonarCloud projects so, yes: SonarCloud

  • Can we have a Quality Profile based on the type of code (source or test)?

No. I don’t think that is possible, but the scoping (above) may help.

  • Can issues be assigned to the person that opens the PR?

Issues are assigned to the last person to touch the issue line, since that might not be the person who opened the PR, I guess the answer is no, not always: SonarCloud

1 Like