I cannot figure out why my tslint
even want to see the trailing comma on the end of the last line in the objects
? How can I set the ignore
rule for the last line of the objects for example? Thanks.
Exemple:
props = {
prop1: 21, // good
prop2: 2, // good
prop3: false // error: [tslint] Missing trailing comma (trailing-comma)
}
Rule for trailing-comma
in my tsconfig.json
:
"trailing-comma": [true, {
"singleline": "never",
"multiline": {
"objects": "always",
"arrays": "always",
"functions": "never",
"typeLiterals": "ignore"
}
}]
trailing commas
forobject
, instead to make it disabled only for the last line in it. Is not? – Advocate