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

adopt pre-commit #291

Merged
merged 5 commits into from
Mar 5, 2021
Merged

adopt pre-commit #291

merged 5 commits into from
Mar 5, 2021

Conversation

minrk
Copy link
Member

@minrk minrk commented Mar 5, 2021

  • replaces npm run fmt which ran prettier on js
  • autoformat html, markdown, yaml, scripts, not just js
  • adds eslint and address a couple linter messages

The only reason not to do this is because pre-commit is a Python package and the js-community generally uses husky to do things like pre-commit hooks.

On the other hand, the rest of JupyterHub uses pre-commit, and that's who contributes here.

run prettier for autoformatting most files (beautysh for shell)
Javascript already formatted, autoformatting applied to the rest
to catch actual errors
- move redundant ca setup to a function
- remove unnecessary escapes in regex
- avoid hasOwnProperty for some reason
@consideRatio consideRatio merged commit f1e5649 into jupyterhub:master Mar 5, 2021
Copy link
Member

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

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

LGTM, happy to see this spread across the JH org!

@minrk minrk deleted the lint branch March 5, 2021 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants