Make Sort Keys Fixable, the Return
See original GitHub issueHey Everyone,
There was a much-needed discussion around how auto fixing sort-keys will change how the code functions at runtime (7714).
This is not ideal, but I feel this is the case that // eslint-disable
is justified. If teams are deciding to warn (or prevent) developers from having unsorted keys, why wouldn’t we give them the ability to simply fix it?
I’m happy to tackle this problem if I get a strong signal to make this rule auto-fixable
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Javascript object fixed sort by key - Stack Overflow
You cannot guarentee object key order. If you need to force an order, then either use an array, or keep a secondary array...
Read more >eslint-plugin-sort-keys-fix - npm
Fork of eslint rule that sorts keys in objects (https://eslint.org/docs/rules/sort-keys) with autofix enabled. Latest version: 1.1.2, ...
Read more >List Rendering - Vue.js
The iteration order will be based on the result of calling Object.keys() on ... can create a computed property that returns the filtered...
Read more >Choosing the Right DynamoDB Partition Key - AWS
All data under a partition key is sorted by the sort key value. ... In this case, use an additional prefix or suffix...
Read more >Dictionaries in Python - Real Python
Python is interpreting them as dictionary keys. If you define this same dictionary in reverse order, you still get the same values using...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should sort-keys only care about either side of the spread?
ahh yes, you’re right - it’s insertion order for non-numeric keys.
I still don’t think this is a real concern; anyone relying on key ordering will break in older browsers too 😃