Add JSCS support #436

Merged
merged 4 commits into from Mar 7, 2014

Projects

None yet

2 participants

@XhmikosR
Member
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 grunt js labels Mar 6, 2014
@XhmikosR XhmikosR added this to the 2.0.2 milestone Mar 6, 2014
@XhmikosR XhmikosR self-assigned this Mar 6, 2014
@XhmikosR
Member
XhmikosR commented Mar 6, 2014

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

@cvrebert
Member
cvrebert commented Mar 6, 2014

/cc @connor

@cvrebert cvrebert commented on an outdated diff Mar 6, 2014
@@ -0,0 +1,26 @@
+{
+ "disallowEmptyBlocks": true,
+ "disallowKeywords": ["with"],
+ "disallowLeftStickedOperators": ["?", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
+ "disallowMixedSpacesAndTabs": true,
+ "disallowMultipleLineStrings": true,
+ "disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
+ "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
@cvrebert
cvrebert Mar 6, 2014 Member

Add ! perhaps?

@cvrebert cvrebert commented on an outdated diff Mar 6, 2014
+ "disallowLeftStickedOperators": ["?", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
+ "disallowMixedSpacesAndTabs": true,
+ "disallowMultipleLineStrings": true,
+ "disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
+ "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
+ "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
+ "disallowTrailingWhitespace": true,
+ "requireCamelCaseOrUpperCaseIdentifiers": true,
+ "requireCapitalizedConstructors": true,
+ "requireCommaBeforeLineBreak": true,
+ "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch", "case", "default"],
+ "requireLeftStickedOperators": [","],
+ "requireLineFeedAtFileEnd": true,
+ "requireParenthesesAroundIIFE": true,
+ "requireRightStickedOperators": ["!"],
+ "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
@cvrebert
cvrebert Mar 6, 2014 Member

Add >, <, >=, <=?

@XhmikosR
Member
XhmikosR commented Mar 7, 2014

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

@cvrebert cvrebert and 1 other commented on an outdated diff Mar 7, 2014
+ "disallowMultipleLineStrings": true,
+ "disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
+ "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
+ "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
+ "disallowTrailingWhitespace": true,
+ "requireCamelCaseOrUpperCaseIdentifiers": true,
+ "requireCapitalizedConstructors": true,
+ "requireCommaBeforeLineBreak": true,
+ "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch", "case", "default"],
+ "requireLeftStickedOperators": [","],
+ "requireLineFeedAtFileEnd": true,
+ "requireParenthesesAroundIIFE": true,
+ "requireRightStickedOperators": ["!"],
+ "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
+ "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
+ "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
@cvrebert
cvrebert Mar 7, 2014 Member

Should also add the additional comparison operators here.

@XhmikosR
XhmikosR Mar 7, 2014 Member

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

@cvrebert
Member
cvrebert commented Mar 7, 2014

👍

XhmikosR added some commits Mar 6, 2014
@XhmikosR XhmikosR Add JSCS support.
Backported from Bootstrap, adapted for Ratchet.
ea3d80f
@XhmikosR XhmikosR Fix JSCS warnings. de2b766
@XhmikosR XhmikosR Move style checks from JSHint to JSCS.
Also remove the duplicate ones from .jshintrc.
74f38b3
@XhmikosR XhmikosR Run `grunt`. 62b55c8
@XhmikosR XhmikosR merged commit e9bad86 into master Mar 7, 2014
@XhmikosR XhmikosR deleted the jscs branch Mar 7, 2014
@connors connors referenced this pull request Mar 12, 2014
Closed

v2.0.2 ship list #484

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment