Skip to content
This repository has been archived by the owner on Jul 8, 2019. It is now read-only.

Is TSlint rules with typechecking supported? #158

Open
304NotModified opened this issue Jul 5, 2017 · 1 comment
Open

Is TSlint rules with typechecking supported? #158

304NotModified opened this issue Jul 5, 2017 · 1 comment

Comments

@304NotModified
Copy link

Some TSLint rules Requires Type Info

I'm trying the rule "completed-docs" which needs type info (gulp told me, the docs are wrong)

When running with gulp it works, but not in Sonar it doesn't show the warnings.

Is this something that should work?

@Pablissimo
Copy link
Owner

Yep, but the only mechanism that lets it work in tslint is to specify a single project file to analyse, rather than individual .ts files. Seems that's not been documented in the readme though so I'll fix that just now, but in essence you need to tack the following configuration into your sonar-project.properties:

sonar.ts.tslint.projectPath=path\to\tsconfig.json
sonar.ts.tslint.typeCheck=true

That will cause the plugin to only analyse the files described by your tsconfig.json but will then supply the relevant arguments to tslint to support type-check-required rules.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants