This site uses cookies for analytics. By continuing to browse this site, you agree to this use.
A JS Foundation Project

TypeScript configuration rules set

TypeScript configuration rules set (@sonarwhal/rule-typescript-config)

typescript-config contains rules to check if your TypeScript configuration has the most recommended configuration.

Why is this important?

If you are building an app or a website using TypeScript, you need to be sure that your configuration is the best for your needs.

Rules

How to use these rules?

To use it you will have to install it via npm:

npm install @sonarwhal/rule-typescript-config

Note: You can make npm install it as a devDependency using the --save-dev parameter, or to install it globally, you can use the -g parameter. For other options see npm's documentation.

And then activate it via the .sonarwhalrc configuration file:

{
"connector": {...},
"formatters": [...],
"parsers": [...],
"rules": {
"typescript-config/is-valid": "error",
"typescript-config/no-comment": "error",
"typescript-config/target": "error"
},
...
}

Further Reading