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

Add a linting task to the project so contributions follow the same standard #40

Closed
molant opened this issue Apr 10, 2015 · 6 comments
Closed

Comments

@molant
Copy link
Contributor

molant commented Apr 10, 2015

I normally use ESLint for code quality, JSCS for code style (spaces, etc.) as a grunt-tasks during the build process and then an .editorconfig file so my editor automatically picks if I should be using tabs or spaces, how many, etc.

We could probably add a test task to the gruntfile to use the code you already have.

@molant
Copy link
Contributor Author

molant commented Apr 10, 2015

@aliuy I think I'll submit a PR with the basic setup with the rules I currently have in my projects and then you can tweak the options to follow your style guide if that sounds ok.

@aliuy
Copy link
Member

aliuy commented Apr 10, 2015

That sounds great!

I'm a bit new to ESLint and JSCS (I've mostly used JSHint for my projects). Mind giving me a little background knowledge? On the surface, it looks like ESLint also supports rules for styling. Is there an advantage for using both?

@molant
Copy link
Contributor Author

molant commented Apr 10, 2015

I think the plan for ESLint is to have the same rules as JSCS but when I started they weren't implemented yet so I right now I'm using JSCS to validate all my spacing is the right one and the other to make sure I have consistent returns, no shadow variables, etc. Haven't check recently if they have added all the style rules.
I also think that ESLint gives a lot more flexibility and supports more things than JSHint (JSX, ES6 for example).

@molant
Copy link
Contributor Author

molant commented May 13, 2015

Now that http://dev.modern.ie is released I have some time to work on this. I'll probably do a PR this week if you are still interested :)

@aliuy
Copy link
Member

aliuy commented May 14, 2015

Yes, we'd love that! 👍

molant added a commit to molant/azure-documentdb-node that referenced this issue May 14, 2015
Added eslint grunt task with the minimum configuration. Need to configure the rest of the rules + fix the issues founded
shipunyc added a commit that referenced this issue Jun 2, 2015
@shipunyc
Copy link
Contributor

shipunyc commented Jun 2, 2015

Thanks.

@shipunyc shipunyc closed this as completed Jun 2, 2015
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

No branches or pull requests

3 participants