Open x1c0 opened 1 week ago
Hi there, this is my .prettierrc.js file
.prettierrc.js
module.exports = { semi: true, trailingComma: 'es5', singleQuote: true, printWidth: 140, tabWidth: 4, useTabs: false, endOfLine: 'auto', plugins: ['prettier-plugin-sort-json'], jsonRecursiveSort: true, jsonSortOrder: 'caseInsensitiveLexical', };
and when I run this on this json:
{ "a": "a", "AB": "AB", "b": { "e": "ff", "c": "dd", "a": "b" }, "c": "c" }
I get:
{ "AB": "AB", "a": "a", "b": { "e": "ff", "c": "dd", "a": "b" }, "c": "c" }
So I see 2 problems here:
jsonSortOrder
AB
a
caseInsensitiveLexical
lexical
jsonRecursiveSort
b
Thank you
Hi there, this is my
.prettierrc.js
fileand when I run this on this json:
I get:
So I see 2 problems here:
jsonSortOrder
is not working sinceAB
should not come beforea
because is not usingcaseInsensitiveLexical
and is using the defaultlexical
jsonRecursiveSort
is also not working since inside ofb
the json is not being sortedThank you