Skip to content
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

integrate .importjs #3436

Merged
merged 7 commits into from
Nov 12, 2018
Merged

integrate .importjs #3436

merged 7 commits into from
Nov 12, 2018

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Nov 7, 2018

This PR adds a config file for importjs which enables convenient import-magic (javascript only) for IDEs and editors (e.g., "fix all imports" command for the current file).

By default, importjs also orders the imports and groups them by type (e.g., external/internal imports). I'll push a commit in a minute in which I ran importjs on the entire JS codebase. Let's hope, the CI build passes :)

  • Ready for review

import type { DatasetConfiguration } from "oxalis/store";
import type { RequestOptions } from "libs/request";
import type { NewTask, TaskCreationResponse } from "admin/task/task_create_bulk_view";
import type { QueryObject } from "admin/task/task_search_form";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, so if it is only types from one imported file, importjs will put the type in front of the { ... }. In that case, no unnecessary imports should be added by importjs, then :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I figured that out too after a while :) The only thing which doesn't work well are * imports. E.g., "import * as Utils from ..." cannot be automatically inserted and is also screwed up when using "fix imports" in a file which already does so -.-
However, we only used these in very few places, which is why I rewrote the parts to use more precise imports (arguably better anyway). I'll file an issue at import-js nevertheless.

@philippotto
Copy link
Member Author

@daniel-wer PR is ready for "review" :)

Copy link
Contributor

@MichaelBuessemeyer MichaelBuessemeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok :) 👍

@philippotto philippotto merged commit f136969 into master Nov 12, 2018
jfrohnhofen added a commit that referenced this pull request Nov 22, 2018
* master:
  Fix rgb support (#3455)
  Fix docker uid/gid + binaryData permissions. Persist postgres db (#3428)
  Script to merge volume tracing into on-disk segmentation (#3431)
  Hotfix for editing TaskTypes (#3451)
  fix keyboardjs module (#3450)
  Fix guessed dataset boundingbox for non-zero-aligned datasets (#3437)
  voxeliterator now checks if the passed map has elements (#3405)
  integrate .importjs (#3436)
  Re-write logic for selecting zoom level and support non-uniform buckets per dimension (#3398)
  fixing selecting bug and improving style of layout dropdown (#3443)
  refresh screenshots (#3445)
  Reduce the free space between viewports in tracing (#3333)
  Scala linter and formatter (#3357)
  ignore reported datasets of non-existent organization (#3438)
  Only provide shortcut for tree search and not for comment search (#3407)
  Update Datastore+Tracingstore Standalone Deployment Templates (#3424)
  In yarn refresh-schema, also invalidate Tables.scala (#3430)
  Remove BaseDirService that watched binaryData symlinks (#3416)
  Ensure that resolutions array is dense (#3406)
  Fix bucket-collection related rendering bug (#3409)
@normanrz normanrz deleted the importjs branch February 20, 2019 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants