Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

object-literal-sort-keys: Add "match-declaration-order" option #2829

Merged
merged 1 commit into from Aug 10, 2017

Conversation

andy-hanson
Copy link
Contributor

PR checklist

Overview of change:

Added the match-declaration-order option, which checks that object literals should match the order of property declarations in their contextual type.

CHANGELOG.md entry:

[new-rule-option]: object-literal-sort-keys: Add match-declaration-order option

Copy link
Contributor

@adidahiya adidahiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good. We can't close #2583 yet; do you intend to enable this new rule option in this repo?

It might be confusing that match-declaration-order applies to single-line literals but alphabetic ordering does not. We should at least document this subtle difference in the behavior (especially since alphabetic ordering is the fallback when a contextual type is not found).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants