config: alphabetize feature flags #3309
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a lower-priority cleanup PR. There are a ton of them, and they're not in any sensible order. That makes them harder to find and would make it pretty easy to accidentally set a feature in two spots.
I did this by copying the feature object into a javascript console.
And then copying the output of that variable (because the console auto-alphabetizes attributes)
And then I copied those lines into an editor and did a regex search/replace to get them into a usable format (quotes around attribute name and comma at the end).
replace:
^([^:]+)([^\n]+)
with"$1"$2,
Testing
I realize this is a difficult PR to review visually, because it would be easy to miss an omission or change in the diff. Probably the best way to make sure I didn't do something crazy is to count the lines removed and added for each file (keeping in mind I am also removing blank lines). Also ensure the final output file looks correct for each features object, with all attribute names quoted, commas at the end of each line except the last attribute, and feature names alphabetized.