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 linter to the project #754

Closed
mojavelinux opened this issue Jan 21, 2018 · 2 comments · Fixed by Urigo/tortilla#56
Closed

Add a linter to the project #754

mojavelinux opened this issue Jan 21, 2018 · 2 comments · Fixed by Urigo/tortilla#56

Comments

@mojavelinux
Copy link
Contributor

I'm trying to contribute to this project and I have no idea what code style I'm supposed to be using. And there's nothing to check that I'm doing it right. A linter would make contributing to this project a lot easier.

I also find the use of commas to be rather eclectic, so it would be nice to either enforce that style or use a more standard style.

My proposal is to use standardJS with eslint. It's extremely popular and effective. I've used it for several months now and I hardly ever having to think about it.

I'm happy to set up this tooling.

@abetomo
Copy link
Collaborator

abetomo commented Jan 21, 2018

I also like the standard.

mojavelinux added a commit to mojavelinux/commander.js that referenced this issue Jan 23, 2018
- add linter configuration based on StandardJS
- customize linter to fit with style of project
- update source to reconcile violations
@mojavelinux
Copy link
Contributor Author

I went ahead and added a linter configuration based on StandardJS with some customizations that adapt it to this project's style.

I left the "yoda" rule enabled and updated the source accordingly. If you disagree, I can roll that back and disable that rule.

I disabled the eqeqeq rule, though I think we should move forward with enabling it.

I changed the comma-leading lines since I couldn't find a rule that allowed us to keep that style.

I'm not running the linter on the tests since we plan to rewrite them anyway. See #649.

mojavelinux added a commit to mojavelinux/commander.js that referenced this issue Jan 23, 2018
- add linter configuration based on StandardJS
- customize linter to fit with style of project
- update source to reconcile violations
- use npm 3 on node 4 in CI
mojavelinux added a commit to mojavelinux/commander.js that referenced this issue Jan 23, 2018
- add linter configuration based on StandardJS
- customize linter to fit with style of project
- update source to reconcile violations
- inherit using util.inherits; must be add top of file for node 4
- use npm 3 on node 4 in CI
mojavelinux added a commit to mojavelinux/commander.js that referenced this issue Jan 23, 2018
- add linter configuration based on StandardJS
- customize linter to fit with style of project
- update source to reconcile violations
- inherit using util.inherits; must be add top of file for node 4
mojavelinux added a commit to mojavelinux/commander.js that referenced this issue Jan 23, 2018
- add linter configuration based on StandardJS
- customize linter to fit with style of project
- update source to reconcile violations
- inherit using util.inherits; must be add top of file for node 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants