You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is very useful in larger codebases where multiple people commit to, in order to reduce merge conflicts if everyone is always appending new keys to the end of objects.
Example:
- let obj1 = {a: 1, c: 3, b: 2}+ let obj1 = {a: 1, b: 2, c: 3}
The text was updated successfully, but these errors were encountered:
A bit similar to #561, but this is for every object literal.
There is an ESLint rule for this:
https://eslint.org/docs/latest/rules/sort-keys
Since ESLint are removing formatting rules, they have not accepted pull requests to implement auto-fixing of that rule, it instead lives in a separate repo:
https://github.com/leo-buneev/eslint-plugin-sort-keys-fix
This is very useful in larger codebases where multiple people commit to, in order to reduce merge conflicts if everyone is always appending new keys to the end of objects.
Example:
The text was updated successfully, but these errors were encountered: