All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rules.tslint.variable-name.html Maven / Gradle / Ivy

Go to download

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: variable-name

Checks variable names for various errors.

Config

Five arguments may be optionally provided:

  • "check-format": allows only camelCased or UPPER_CASED variable names
    • "allow-leading-underscore" allows underscores at the beginning (only has an effect if “check-format” specified)
    • "allow-trailing-underscore" allows underscores at the end. (only has an effect if “check-format” specified)
    • "allow-pascal-case allows PascalCase in addtion to camelCase.
  • "ban-keywords": disallows the use of certain TypeScript keywords (any, Number, number, String, string, Boolean, boolean, undefined) as variable or parameter names.
Examples
"variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore"]
Schema
{
"type": "list",
"listType": {
"type": "enum",
"enumValues": [
"check-format",
"allow-leading-underscore",
"allow-trailing-underscore",
"allow-pascal-case",
"ban-keywords"
]
}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy