-
Notifications
You must be signed in to change notification settings - Fork 412
Build: Switch from JSHint to ESLint with the jquery preset #110
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
Conversation
LGTM 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few comments above, after that it LGTM
"rules": { | ||
|
||
// Increase max-len to 120 for now, there are too many violations and the rule | ||
// is not auto-fixable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok to remove this later, but this comment is not necessary and it's invalid for the syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is valid. This type of ESLint config allows comments, similarly to how .jshintrc allowed comments.
options: { | ||
jshintrc: true | ||
|
||
// See https://github.com/sindresorhus/grunt-eslint/issues/119 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
404, no issues tracker available on https://github.com/sindresorhus/grunt-eslint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sindre was getting too many issues reported and he disabled the bug tracker... He's done it before and restored later so this issue is most likely still there. Do you want me to remove this comment? Maybe there's a version in Web Archive?
} | ||
|
||
// for now all property types without mod have min and max | ||
return 0 > value ? 0 : type.max < value ? type.max : value; | ||
return Math.min( type.max, Math.max( 0, value ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
Apparently eslint fixed this in a wrong way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't ESLint, it was me. What's wrong here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation using spaces instead of tab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, true. We don't enforce indentation via ESLint yet, it's waiting for eslint/eslint#6690 to get fixed. I applied the change.
Also, fix linting violations in the process
@leobalter I applied indentation fixes & replied to your other comments. PTAL. |
Also, fix linting violations in the process