Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

How to setup atom with nuclide plugins.

You need to install next packages

  • hyperclick
  • nuclide-diagnostics-store
  • nuclide-diagnostics-ui
  • nuclide-flow

You need to add .flowconfig

For me the most useful part is this module.name_mapper='react-babel-playground' -> '../src/playground' This tells to flow about your aliases, and libraries locations (if libraries not in node_modules for example)

One of my projects contains next name_mapper module.name_mapper='^\(lib\|components\|actions\|consts\|reducers\)\/\(.*\)$' -> '<PROJECT_ROOT>/app/\1/\2'

You will get 'Goto definition' with cmd-click

goto definition

You will get autocomplete

autocomplete

You will flow error reporting

flow report

[ignore]
.*/node_modules/fbjs/.*
.*/node_modules/babel-types/.*
.*/node_modules/babel-traverse/.*
.*/node_modules/babylon/.*
.*/node_modules/babel-generator/.*
.*/node_modules/babel-core/lib/.*
.*/node_modules/babel-helper.*
[include]
[libs]
src/typedefs
[options]
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-6]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*www[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-6]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*www[a-z,_]*\\)?)\\)? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
esproposal.class_instance_fields=ignore
esproposal.class_static_fields=ignore
module.name_mapper='react-babel-playground' -> '../src/playground'
munge_underscores=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment