Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Enforce sort order within destructured imports #124

Closed
wincent opened this issue Dec 16, 2019 · 0 comments · Fixed by #145
Closed

Enforce sort order within destructured imports #124

wincent opened this issue Dec 16, 2019 · 0 comments · Fixed by #145

Comments

@wincent
Copy link
Contributor

wincent commented Dec 16, 2019

Requested by Brian here.

We currently sort import statements (with respect to each other), and destructuring bindings inside objects (via the sort-destructure-keys/sort-destructure-keys rule), but we don't sort destructuring within import statements; eg:

import {
	CREATE_SEGMENTS_EXPERIENCE,
	EDIT_SEGMENTS_EXPERIENCE,
	DELETE_SEGMENTS_EXPERIENCE,
	DEPRIORITIZE_SEGMENTS_EXPERIENCE_PRIORITY,
	PRIORITIZE_SEGMENTS_EXPERIENCE_PRIORITY
} from '../actions';

The sort-destructure-keys/sort-destructure-keys plugin only works with objects, but we should be able to do something very similar (and likely simpler because we don't have to worry about nesting) for import statements.

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

Successfully merging a pull request may close this issue.

1 participant