In my tslint.json I have object-literal-sort-keys defined as match-declaration-order:
{
"defaultSeverity": "error",
"extends": [
"tslint:recommended"
],
"jsRules": {},
"rules": {
"no-console": false,
"object-literal-sort-keys": [
true,
"match-declaration-order"
],
"max-line-length": [
true,
200
],
"typedef": [
true,
"member-variable-declaration",
"variable-declaration"
]
},
"rulesDirectory": []
}
However I'm always getting this error:
object-literal-sort-keys needs type info to use "match-declaration-order" or
"match-declaration-order-only".
See https://palantir.github.io/tslint/usage/type-checking/ for documentation on
how to enable this feature.
I have tried the examples shown in the documentation, but they don't solve the issue. The only thing removing this error is to use the object-literal-sort-keys default setting, but then I have to alphabetically sort all arrays.
How do I have to configure object-literal-sort-keys to make this error go away?