
rules.tslint.no-inferrable-types.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-web-frontend-typescript Show documentation
Show all versions of sonar-web-frontend-typescript Show documentation
Consume reports generated by tslint for code quality. Also consume reports for code duplication (either simian or cpd). Consumes the unit/integration tests reports (generated by Jasmin) coverage report (lcov generated by Istanbul). The information generated by reports are added in Sonar
The newest version!
Details
Rule: no-inferrable-types
Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean.
Rationale
Explicit types where they can be easily infered by the compiler make code more verbose.
Config
One argument may be optionally provided:
ignore-params
allows specifying an inferrable type annotation for function params.
This can be useful when combining with the typedef
rule.
Examples
"no-inferrable-types": true
"no-inferrable-types": [true, "ignore-params"]
Schema
{
"type": "list",
"listType": {
"type": "enum",
"enumValues": [
"ignore-params"
]
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy