I'm struggling to understand why my tslint
insists on having a trailing comma at the end of the last line in the objects
. Is there a way to configure the ignore
rule for the last line of objects? Appreciate any help!
For example:
settings = {
setting1: "value1", // accepted
setting2: "value2", // accepted
setting3: true // error: [tslint] Missing trailing comma (trailing-comma)
}
The current configuration for trailing-comma
in my tsconfig.json
file is as follows:
"trailing-comma": [true, {
"singleline": "never",
"multiline": {
"objects": "always",
"arrays": "always",
"functions": "never",
"typeLiterals": "ignore"
}
}]