HTML and Typescript Custom Rule Writing

Hello Team,
Is there anyway to write custom rules for HTML and TypeScript (for open-source or paid version)? We need immediate help!

1 Like

Hello,

unfortunately writing custom rules in SonarTS is currently not possible, and we don’t plan to work on it for the time being.

However if the rule you have in mind is applicable in general, you can share the idea and we can consider to implement the rule.

1 Like

Tibor,
We have already done modification for sonarweb plugin according to our requirements but wrt SonarTS we are not able to understand the architecture of that plugin coding style means like implementation file, test file and unit test file. The repo we got from github is having multiple files with typescript and java so is it possible to write the code with java only like we do in Sonarweb. I will be thankful for your cooperation as by this way i can contribute to SONAR community as well.
Thanks in advance!

We do not support writing custom rules in SonarTS. Architecture of that plugin is quite different because it is based on TypeScript compiler and TSLint. Rules are actually written in TypeScript.

If you really need to write custom rules, best way would be to write custom rule for TSLint and import the report from TSLint into SonarQube.

TSLint report import will be available in SonarQube 7.2 and SonarTS 1.7, which are about to be released soon.

Okay,Thank you for your quick response