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 JS lint workflow #230

Merged
merged 14 commits into from
Jun 21, 2023
Merged

Conversation

JasonWeill
Copy link
Collaborator

@JasonWeill JasonWeill commented Jun 19, 2023

Ran jlpm lint inside packages/jupyter-ai. This change fixes or suppresses all lint errors found.

Adds a new GitHub action to run lerna run lint on every pull request in this package. Note that the action doesn't run on this pull request.

This is prep work for #201, which should run lint on all PRs.

@JasonWeill JasonWeill added maintenance Change related to maintenance of the repository @jupyter-ai/core labels Jun 19, 2023
@3coins
Copy link
Collaborator

3coins commented Jun 19, 2023

@JasonWeill
Thanks for creating this PR. You might also want to update the lint command in root package.json, so it points to jupyter_ai package.

lint: lerna run lint --stream --scope \"@jupyter-ai/core\"

@JasonWeill
Copy link
Collaborator Author

Should we add eslint to other packages in this repo with TypeScript code in them?

@3coins
Copy link
Collaborator

3coins commented Jun 19, 2023

Should we add eslint to other packages in this repo with TypeScript code in them?

jupyter_ai is the only package with TS code. I think cookiecutter is not currently usable as is for providers.

@JasonWeill
Copy link
Collaborator Author

When running at the top level, it seems like code in the core package gets run:

(jupyter-ai) c889f3b5ce75:jupyter-ai jweill$ jlpm run lint
yarn run v1.21.1
$ jlpm && lerna run prettier && lerna run eslint
[1/4] 🔍  Resolving packages...
success Already up-to-date.
lerna notice cli v6.6.2

> @jupyter-ai/core:prettier

$ jlpm prettier:base --write --list-different
$ prettier "**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}" --write --list-different

 ——————————————————————————————————————————————————————————————————————————————

 >  Lerna (powered by Nx)   Successfully ran target prettier for project @jupyter-ai/core (2s)
 
lerna notice cli v6.6.2

> @jupyter-ai/core:eslint

$ jlpm eslint:check --fix
$ eslint . --cache --ext .ts,.tsx --fix

 ——————————————————————————————————————————————————————————————————————————————

 >  Lerna (powered by Nx)   Successfully ran target eslint for project @jupyter-ai/core (1s)
 
✨  Done in 5.63s.

.github/workflows/tests.yml Outdated Show resolved Hide resolved
@JasonWeill JasonWeill closed this Jun 21, 2023
@JasonWeill JasonWeill reopened this Jun 21, 2023
@dlqqq dlqqq changed the title Fixes lint errors in jupyter-ai package add linting workflows Jun 21, 2023
@dlqqq dlqqq changed the title add linting workflows add JS lint workflow Jun 21, 2023
@JasonWeill
Copy link
Collaborator Author

Looks good! Thanks @dlqqq for your revisions. (I can't give a ship-it to this PR, since I'm still listed as the author.)

@dlqqq dlqqq merged commit 4470155 into jupyterlab:main Jun 21, 2023
@3coins 3coins mentioned this pull request Jun 23, 2023
dbelgrod pushed a commit to dbelgrod/jupyter-ai that referenced this pull request Jun 10, 2024
* Fixes error and omission in config files

* Changes after running jlpm lint once

* Modifies eslint config

* Ignores dotfiles

* Fix lint errors

* Fixes or ignores eslint warnings

* Add new workflow

* Fix error in config

* Runs linting only on Linux

* Uses standard GitHub action for setup-node

* Force yarn used for caching

* Simplify test config

* Adds reopen trigger

* fix lint workflow

---------

Co-authored-by: David L. Qiu <david@qiu.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@jupyter-ai/core maintenance Change related to maintenance of the repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants