Skip to content

[eslint-plugin] sort keys rule should sort object keys when applying fix #787

Open
@nmn

Description

The sort-keys rule in @stylexjs/eslint-plugin correctly detects any key in a style object that is not sorted as it should be. (This is not alphabetical, but ordered according to style specificity).

The issue is with the auto-fix offered. It only moves the particular key that is not sorted correctly, but it can often leave behind additional lint warnings in the same style object.

Expected behaviour"
When the auto-fix is applied, the entire object should be sorted as expected such that there are no lint warnings after the auto-fix.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions