M
M
Maxim2016-01-16 20:02:53
JavaScript
Maxim, 2016-01-16 20:02:53

How to properly format long strings in Atom Editor?

I want to set up normal formatting for long lines. For example:

export default connect(
  (state) => ({
    instruments: state.instruments,
    user: state.user,
    metrics: state.metrics
  }),
  (dispatch) => bindActionCreators({
    fetchMetrics
  }, dispatch)
)(InstrumentPriceChart);

formatted in
export default connect((state) => ({instruments: state.instruments, user: state.user, metrics: state.metrics}), (dispatch) => bindActionCreators({
  fetchMetrics
}, dispatch))(InstrumentPriceChart);

Tell me how to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Petrenko, 2016-01-19
Antonikhin @STJ

You need JSCS, smoke a couple of packs over `.jscsrc` and some of its plugins that automatically correct the code and bring it to the required code-style format.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question