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

change linter to eslint, fix codebase #606

Merged
merged 3 commits into from Jul 7, 2017

Conversation

brendanashworth
Copy link
Contributor

This fixes #604.

It changes the linter to eslint (now replacement for JSC). Most of the linters work the same so it's not so much about the linter but the rule choices. It also now runs gulp lint during CI tests.

I chose rules that aligned with the current codebase, but at times when it wasn't consistent, I chose what I thought was more prevalent / looked better. For example, indentation is just a hodge podge, but it's better to have rules for it than it be different across the whole codebase. (thats why the third commit is LONG)

JSHint as it was wasn't strict at all. JSC, on the other hand, was
discontinued and continued into eslint, a very popular tool. I chose to
replace them with eslint for its strictness. The tools are pretty
compatible with eachother so there wasn't much of a choice to be made,
they'd all work to some extent.
mostly semicolons to remove, unused variable declarations
@krishnasrinivas
Copy link
Contributor

@brendanashworth this is great, is there someway these indentation rules can be used by some tool like https://github.com/millermedeiros/esformatter which can indent the source?

@brendanashworth
Copy link
Contributor Author

@krishnasrinivas yes! Eslint allows you to do eslint ... --fix, which will automatically fix all the indentation issues in the source according to the rules you give it. That's how I generated the last commit.

@krishnasrinivas krishnasrinivas merged commit 8c0ca7c into minio:master Jul 7, 2017
@brendanashworth
Copy link
Contributor Author

thanks!

@krishnasrinivas
Copy link
Contributor

thanks!

no, thank you.

@deekoder deekoder requested review from poornas and harshavardhana and removed request for poornas July 7, 2017 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Choose single linter, make pass, and make stricter
2 participants