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

Add JSCS support #436

Merged
merged 4 commits into from
Mar 7, 2014
Merged

Add JSCS support #436

merged 4 commits into from
Mar 7, 2014

Conversation

XhmikosR
Copy link
Member

@XhmikosR XhmikosR commented Mar 6, 2014

Close #280.

/CC @cvrebert

Not sure how to make JSCS happy with the unary add. Any ideas?

@XhmikosR XhmikosR added this to the 2.0.2 milestone Mar 6, 2014
@XhmikosR XhmikosR self-assigned this Mar 6, 2014
@cvrebert
Copy link
Contributor

cvrebert commented Mar 6, 2014

Yes, see jscs-dev/node-jscs#89 (comment)

@XhmikosR
Copy link
Member Author

XhmikosR commented Mar 6, 2014

OK, I updated the patch, please check the rules and ping me :)

@cvrebert
Copy link
Contributor

cvrebert commented Mar 6, 2014

/cc @connor

"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineStrings": true,
"disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Add ! perhaps?

@XhmikosR
Copy link
Member Author

XhmikosR commented Mar 7, 2014

@cvrebert: I added both changes, they make sense.

"requireRightStickedOperators": ["!"],
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
Copy link
Contributor

Choose a reason for hiding this comment

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

Should also add the additional comparison operators here.

Copy link
Member Author

Choose a reason for hiding this comment

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

lol just added them, was about to push it :P

@cvrebert
Copy link
Contributor

cvrebert commented Mar 7, 2014

👍

Backported from Bootstrap, adapted for Ratchet.
Also remove the duplicate ones from .jshintrc.
XhmikosR added a commit that referenced this pull request Mar 7, 2014
@XhmikosR XhmikosR merged commit e9bad86 into master Mar 7, 2014
@XhmikosR XhmikosR deleted the jscs branch March 7, 2014 06:02
@connors connors mentioned this pull request Mar 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add JSHint and/or JSCS task to Gruntfile?
2 participants