Configuration for capital case
bennycode opened this issue ยท 2 comments
bennycode commented
Hello!
Can I configure the "typescript-sort-keys/interface" rule so that it is not case sensitive? In my scenario it complains about the following:
interface Test {
client: string;
REST_URL: string;
}
Expected interface keys to be in ascending order. 'REST_URL' should be before 'client'
But in my case I want to prefer "client" to be on top because "c" comes before "r" (when not case sensitive).
infctr commented
Yes, it's configurable with options
{
"typescript-sort-keys/interface": [
"error",
"asc",
{ "caseSensitive": false }
]
}
Refer to all options available https://github.com/infctr/eslint-plugin-typescript-sort-keys/blob/master/docs/rules/interface.md
bennycode commented
Perfect! That's exactly what I was looking for. Missed the link from the README.