TSLint rule for ordering object literal keys like in corresponding type of interface.
See tests for info about provided checkings.
npm i -D tslint-object-literal-smart-keys
{
"rulesDirectory": [
"./node_modules/tslint-object-literal-smart-keys/rules"
],
"rules" {
"object-literal-sort-keys": false, // don't forget disable it!
"object-literal-smart-keys": true
}
}
- Complicated cases