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

rules.tslint.trailing-comma.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: trailing-comma

Requires or disallows trailing commas in array and object literals, destructuring assignments and named imports.

Config

One argument which is an object with the keys multiline and singleline. Both should be set to either "always" or "never".

  • "multiline" checks multi-line object literals.
  • "singleline" checks single-line object literals.

A array is considered “multiline” if its closing bracket is on a line after the last array element. The same general logic is followed for object literals and named import statements.

Examples
"trailing-comma": [true, {"multiline": "always", "singleline": "never"}]
Schema
{
"type": "object",
"properties": {
"multiline": {
"type": "enum",
"enumValues": [
"always",
"never"
]
},
"singleline": {
"type": "enum",
"enumValues": [
"always",
"never"
]
}
}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy