-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(js): add lint rules for import order: eslint-plugin-simple-import-sort #6028
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
// @flow | ||
import '../../../robot-api/__utils__/epic-test-mocks' | ||
|
||
import { calibrationEpic } from '..' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to the documentation of the plugin:
This seems to be the exact opposite of what has happened in this file, which is confusing to me There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. confuses me too! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. me three |
||
import * as Fixtures from '../../__fixtures__' | ||
import { runEpicTest, setupEpicTestMocks } from '../../../robot-api/__utils__' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't say I'm a fan of this. "Import the mock before you import the code under test" is my preferred way to do this, which is how things were ordered before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean, isn't this importing the mocks before any other imports?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is, but we only need it because this plugin arbitrarily put them out of order in the first place. The "after" here seems arbitrary and (as noted in my other comment) not what the plugin is supposed to do