Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Comments

Add jscs lint configuration.#6

Merged
cmcculloh-kr merged 1 commit intoExactTarget:masterfrom
gdborton:master
Jun 5, 2015
Merged

Add jscs lint configuration.#6
cmcculloh-kr merged 1 commit intoExactTarget:masterfrom
gdborton:master

Conversation

@gdborton
Copy link
Contributor

@gdborton gdborton commented May 8, 2015

You can see the airbnb rules here
The full rule list here

preset === follow their rules other than listed exceptions.

Exception reasoning-

  • validateLineBreaks - windows editors use CRLF by default some editors (Atom) don't allow you to change this, but git converts to LF by default automagically anyway.
  • disallowQuotedKeysInOjbect - Changed this rule to allow for javascript styles in react based projects. (float is a reserved word, but valid css key)
  • validateIndentation - Styleguide currently says to use tabs, they use 2 spaces.

@cmcculloh-kr
Copy link

Thanks! I don't see this one listed. Is it just on by default? Or was that a miss?

@gdborton
Copy link
Contributor Author

Some of the rules are more general that others.

function a (){
};
var b = function (){
};

Both will fail the rule requireSpaceBeforeBlockStatements.
The first will fail the rule disallowSpacesInFunctionDeclaration.
The second will fail the rules disallowSpacesInFunctionExpression and disallowSpacesInAnonymousFunctionExpression

Their docs aren't super clear on how the precedence occurs.

@gdborton
Copy link
Contributor Author

@cmcculloh any other feedback on this? Might have another pull coming in afterward that would cause some merge issues.

@gdborton
Copy link
Contributor Author

gdborton commented Jun 5, 2015

bueller?

@cmcculloh-kr
Copy link

Sorry, I kept meaning to look into this. The proper syntax is:

function a() {
};

function () {
};

I just need you to confirm that it does the right thing for that.

@gdborton
Copy link
Contributor Author

gdborton commented Jun 5, 2015

Yep, it's covered.

cmcculloh-kr pushed a commit that referenced this pull request Jun 5, 2015
Add jscs lint configuration.
@cmcculloh-kr cmcculloh-kr merged commit 4331f77 into ExactTarget:master Jun 5, 2015
@cmcculloh-kr
Copy link

thanks!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants