Skip to content

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

Merged
merged 1 commit into from
Nov 2, 2016

Conversation

mgol
Copy link
Member

@mgol mgol commented Oct 26, 2016

Also, fix linting violations in the process

@raphamorim
Copy link
Member

LGTM 👍

Copy link
Member

@leobalter leobalter left a 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.
Copy link
Member

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.

Copy link
Member Author

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
Copy link
Member

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

Copy link
Member Author

@mgol mgol Oct 27, 2016

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 ) );
Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Member Author

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
@mgol
Copy link
Member Author

mgol commented Nov 2, 2016

@leobalter I applied indentation fixes & replied to your other comments. PTAL.

@leobalter leobalter merged commit f5c2e6e into jquery:master Nov 2, 2016
@mgol mgol deleted the eslint branch November 2, 2016 15:05
@mgol mgol modified the milestones: 3.0.0, 2.2.0 May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

4 participants