Skip to content

Linters should support sort keys in js files #41767

Description

@MrJithil

What is the problem this feature will solve?

Currently, the object keys need manual verification to ensure all the keys are in sort order.

Eg: const { z, y, x} = alphabets; should be sorted as const { x,y,z } = alphabets;.

Devs may miss to sort it.

What is the feature you are proposing to solve the problem?

Object key sorting could be enforced using the ESLint rule. This could be done using the rule https://eslint.org/docs/rules/sort-keys

What alternatives have you considered?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues requesting new Node.js features.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions