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

Use pre-commit #237

Merged
merged 4 commits into from
Jun 23, 2023
Merged

Use pre-commit #237

merged 4 commits into from
Jun 23, 2023

Conversation

dlqqq
Copy link
Member

@dlqqq dlqqq commented Jun 23, 2023

Description

Introduces pre-commit to handle linting of non-JS files.

@dlqqq dlqqq added the enhancement New feature or request label Jun 23, 2023
@dlqqq
Copy link
Member Author

dlqqq commented Jun 23, 2023

For some reason, I'm not able to install pre-commit.ci onto this repository. I've created an issue on the JL team compass to have somebody with authorization on the jupyterlab org attempt an installation: jupyterlab/frontends-team-compass#201

@dlqqq dlqqq closed this Jun 23, 2023
@dlqqq dlqqq reopened this Jun 23, 2023
@3coins
Copy link
Collaborator

3coins commented Jun 23, 2023

@dlqqq
Is there an overlap between this and the JS lint CI that @JasonWeill has added in #230 on text/markdown files? Can we suppress one over other for these files?

@dlqqq
Copy link
Member Author

dlqqq commented Jun 23, 2023

@3coins I don't believe that will be an issue. This command defines the file extensions that jlpm lint acts on:

"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",

So, the only files that we need to worry about are MD and JSON files. Our pre-commit configuration doesn't appear to have any linters specific to these file extensions; the changes made by pre-commit are limited to deleting trailing whitespace and ensuring each file ends with a newline.

@3coins 3coins added maintenance Change related to maintenance of the repository and removed enhancement New feature or request labels Jun 23, 2023
@3coins 3coins added this to the 0.9.0 Release milestone Jun 23, 2023
@JasonWeill JasonWeill merged commit 785b900 into jupyterlab:main Jun 23, 2023
@dlqqq dlqqq deleted the precommit branch June 23, 2023 21:26
dbelgrod pushed a commit to dbelgrod/jupyter-ai that referenced this pull request Jun 10, 2024
* add precommit config

* add pre-commit to Python dev dependency groups

* precommit initial pass

* fix precommit
Marchlak pushed a commit to Marchlak/jupyter-ai that referenced this pull request Oct 28, 2024
* add precommit config

* add pre-commit to Python dev dependency groups

* precommit initial pass

* fix precommit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Change related to maintenance of the repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automate code styling
3 participants