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 ESLint to CI and Commit Hooks #1783

Open
3 tasks done
dblythy opened this issue Sep 5, 2021 · 4 comments
Open
3 tasks done

Add ESLint to CI and Commit Hooks #1783

dblythy opened this issue Sep 5, 2021 · 4 comments
Labels
bounty:$10 Bounty applies for fixing this issue (Parse Bounty Program) type:ci CI related issue

Comments

@dblythy
Copy link
Member

dblythy commented Sep 5, 2021

New Feature / Enhancement Checklist

Current Limitation

Currently, there is no ESLint enforcement on this repo. Nor is there an option to run npm run lint-fix like the other repo's have.

Feature / Enhancement Description

Having lint as part of our CI here would help detect bugs and poorly written code.

Example Use Case

Alternatives / Workarounds

Manually run lint

3rd Party References

@parse-github-assistant
Copy link

parse-github-assistant bot commented Sep 5, 2021

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!

@mtrezza mtrezza added the type:meta Non-code issue label Sep 5, 2021
@mtrezza mtrezza added type:ci CI related issue and removed type:meta Non-code issue labels Sep 30, 2021
@mtrezza
Copy link
Member

mtrezza commented Oct 9, 2021

I personally am not particularly fond of commit hooks. I think we have discussed that in the past - a prettified code block may not always be the most practical style during code development. I would prefer a CI step over commit hooks. Unless having both brings any benefits?

@dblythy
Copy link
Member Author

dblythy commented Oct 9, 2021

I think commit hooks are good to make sure that PRs fit the lint standards that we apply, regardless of the additional styles of prettier. Hooks can always be skipped with --no-verify

@mtrezza
Copy link
Member

mtrezza commented Oct 9, 2021

As I understand it,
"ensuring" would be the purpose of the CI step
"adapting" would be the purpose of the commit hook

I don't believe it's developer friendly to force-prettify code they are still working on when making a commit. Just thinking about breakpoints that are set to specific lines, when suddenly the lines change because of a prettify. When working on a code block and the structure suddenly changes, that could also be somewhat disruptive as the developer would have to reorient visually. A developer would have to move to use git shell commands to use --no-verify because a git UI (like GitHub Desktop) rarely supports this flag.

When would these hooks be invoked?

@mtrezza mtrezza added the bounty:$10 Bounty applies for fixing this issue (Parse Bounty Program) label Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty:$10 Bounty applies for fixing this issue (Parse Bounty Program) type:ci CI related issue
Projects
None yet
Development

No branches or pull requests

2 participants