Skip to content

Allow specifying locale for react/jsx-sort-props #3002

Closed
@nizamiza

Description

@nizamiza

We work in a team where people have systems with different locales. When we add react/jsx-sort-props to our eslint config, it behaves differently for each system.

For example, on a en-US system, props for the component below are sorted like this:

<RawFileField
  onChange={handleChange}
  onFileRemove={asMedia ? null : handleRemove}
  {...props}
/>

But on a sk-SK system, they're sorted like this:

<RawFileField
  onFileRemove={asMedia ? null : handleRemove}
  onChange={handleChange}
  {...props}
/>

This results in eslint tests passing locally, but failing during CI/CD pipelines. Ability to specify which locale to use for sorting would be nice.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions