eslint-config-canonical
eslint-config-canonical copied to clipboard
`sort-keys` autofix is case-sensitive
In a Json document, the autofix for sort-keys
is case-sensitive, resulting in an error for `jsonc/sort-keys`` which is case-insensitive
Expected object keys to be in natural insensitive ascending order. 'usernamePasswordIsEnabled' should be before 'userPoolRegion'. eslint (jsonc/sort-keys)
code produced after autofix:
{
"userPoolId": "eu-central-1_xxxx",
"userPoolRegion": "eu-central-1",
"usernamePasswordIsEnabled": true
}
Could you submit a patch to config?
Sure, will do that tommorow 👍🏻
Ok, after some time digging I couldn't find the issue. Changing jsonc/sort-keys
had no effect on the autofix. Setting caseSensitive: true
removes the error, but it is sorted sensitive.
So is this a bug in jsonc plugin? CC @ota-meshi
Closing as there is lack of context.