Wrap line if length exceeds

hello folks,

what are the settings that the code formatter automatic cuts a line (at a reasonable position) if the line exceeds the max length (es lint rule: max-len)

 

my settings:

 

Currently the code formatter doesn't cut line..

1
6 comments

Set Hard wrap at to preferred value, then change Do not wrap to Wrap if long (or Chop down if long) for all items in the Wrapping and Braces tab

5

Thanks It it sort of working.... 

I have the following config: 

 

Unfortuntely, it wraps and creates an new line when the find function is called. Do you have an idea how the eslint rule "function-parent-newline" can be enforced? 

0

no new line is inserted for me using similar settings; please provide a complete code snippet as text

0

ok, somehow the problem doesn't occur annymore.... now I have problems with a js object ....

 

I can't figure out why the code formatter is working like this.

It's a indent problem again :-(

 

After eslint --fix 

 

Settings:

const unreportedSchedules = [];
const config = {};

unreportedSchedules.push({
ruleInstance: 'foo',
config: {
notificationId: config.notificationId,
maxRetrials: config.maxRetries,
retryDelay: config.retryDelay,
},
});
0

You must have Method call arguments | Align when multiline enabled in Settings | Editor | Code Style | JavaScript | Wrapping and Braces

0

I don't have the section Method call arguments.. just Function call arguments

I deactivated the prop.. Now it seems to be working

0

Please sign in to leave a comment.