A user is going around reformatting Stack snippets to put all provided data on a single line, effectively turning things like this:
const data = [{
id: 'id1',
entries: [{
key: 'key1',
value: 'value1'
}, {
key: 'key2',
value: 'value2'
}, {
key: 'key3',
value: 'value3'
}]
}];
/*
Some logic operating on the above data
*/
Into this:
const data = [{id: 'id1', entries: [{key: 'key1', value: 'value1'}, {key: 'key2', value: 'value2'}, {key: 'key3', value: 'value3'}]}];
/*
Some logic operating on the above data
*/
For an example, see my answer here (which I have chosen to roll back), and the other answer to the same question that got the same treatment from the same user.
Is this considered to be acceptable edit behavior? Does the community consider the "corrected" snippet to be more readable?
<function/solution> <data> <call to function>
. Whether I minify the data or not matters less, and even if I do, there's no weird blob at the top. This would conflict with the author's intent as an edit, though, so I only apply it to my own answers. If the data is different than the OP's, best not to minify it.