Skip to content

Enable ESLint on driver project #448

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 5 commits into from
Apr 8, 2019
Merged

Enable ESLint on driver project #448

merged 5 commits into from
Apr 8, 2019

Conversation

ali-ince
Copy link
Contributor

@ali-ince ali-ince commented Apr 5, 2019

This PR enables ESLint on the driver project to enforce standard code styling and checks for problematic patterns.

Based on #447.

@ali-ince ali-ince requested a review from lutovich April 5, 2019 14:52
Copy link
Contributor

@lutovich lutovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Noticed a bit weird formatting in two files:

  • integer.js has vars on the same line and quite long if-else on the same line
  • connection.js has very long if-else lines

Would be nice to also enable linting on TypeScript files in future.

@oskarhane
Copy link
Member

While you're at it, I would recommend adding https://prettier.io as well.
It's very common in js projects these days.
Auto formatting, in addition to linting.
We use it in browser, desktop etc.

I figured I'd mention it while you're poking around with formatting.

@ali-ince
Copy link
Contributor Author

ali-ince commented Apr 8, 2019

@lutovich thanks for the review, with @oskarhane's suggestion I've also integrated prettier and it resulted in the formatting errors you've pointed out to be resolved.

I'll take a look at typescript linting in the future.

thanks!

@oskarhane
Copy link
Member

Nice! I'd suggest you add the lint-staged step for formatting with prettier on commits, to keep the code well formatted (it only formats staged files).
See: https://prettier.io/docs/en/precommit.html

@ali-ince ali-ince merged commit 066a410 into neo4j:2.0 Apr 8, 2019
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.

3 participants