-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Values for duplicate object keys as seen in package.json comments are lost during autofix.
Before an autofix to package.json:
{
"dependencies": {
"//": "comment about foo",
"foo": "^1.2.3",
"//": "comment about bar",
"bar": "^4.5.6",
"//": "comment about baz",
"baz": "^7.8.9",
}
}
After an autofix to the file:
{
"dependencies": {
"//": "comment about baz",
"foo": "^1.2.3",
"bar": "^4.5.6",
"baz": "^7.8.9",
}
}
We use edit-json-file to actual edit the file. It likely serializes/deserializes the file into an object which doesn't support duplicate keys.
Until IonicaBizau/edit-json-file#59 is fixed, we should disable autofix in places where comments will be lost.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working