jslint code style possible?

Is it somehow possible to
Preferences -> code style -> javascript -> set from: jslint

Wether it would be called "jslint" or something else is obviously irrelevant. I am simply aiming for code reformating to be done in a jslint acceptable style. E.g. keeping else on the same line as the previous closing }. If possible without having to set the rules myself.

regards
johan

2 comments
Comment actions Permalink

Hello!

no, it's not possible. Related tickets:
http://youtrack.jetbrains.com/issue/WEB-2227
http://youtrack.jetbrains.com/issue/WEB-894


BTW, you can get 'else' placed on the same line:
1. Settings -> Code Style -> JavaScript -> 'Wrapping and braces"
2. in 'if() statement' section, untick ''else' on new line'

Also, make sure to set "Keep line breaks" option off in 'Keep when reformatting' section - otherwise existing line breaks will be preserved so that 'else' will remain on its line

0
Comment actions Permalink

Thanks for the feedback. I added a feature request for preset rules. I am aware that I can specify these rules myself, but I would still prefer having a preset. Should anyone else be interested in such an option, you can upvote it here: http://youtrack.jetbrains.com/issue/WI-21798

0

Please sign in to leave a comment.