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

chore: run eslint and tsc in missing packages #6090

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

threepointone
Copy link
Contributor

@threepointone threepointone commented Jun 19, 2024

Some of our packages didn't have a lint/typecheck rule setup, so I added it. Also fixed a couple of failures along the way. I didn't enable linting for kv-asset-handler because that looks like a bit more work, which we can do later.

No changeset / tests for this, no functional changes.

@threepointone threepointone requested review from a team as code owners June 19, 2024 15:08
Copy link

changeset-bot bot commented Jun 19, 2024

⚠️ No Changeset found

Latest commit: 39515d3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Jun 19, 2024

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9584485005/npm-package-wrangler-6090

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6090/npm-package-wrangler-6090

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9584485005/npm-package-wrangler-6090 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9584485005/npm-package-create-cloudflare-6090 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9584485005/npm-package-cloudflare-kv-asset-handler-6090
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9584485005/npm-package-miniflare-6090
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9584485005/npm-package-cloudflare-pages-shared-6090
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9584485005/npm-package-cloudflare-vitest-pool-workers-6090

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.61.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240610.1
workerd 1.20240610.1 1.20240610.1
workerd --version 1.20240610.1 2024-06-10

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

Some of our packages didn't have a lint/typecheck rule setup, so I added it. Also fixed a couple of failures along the way. I _didn't_ enable linting for kv-asset-handler because that looks like a bit more work, which we can do later.
@@ -30,7 +30,6 @@
"dev:codemod": "node -r esbuild-register scripts/codemodDev.ts",
"check:lint": "eslint .",
"check:type": "tsc",
"lint": "eslint",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we already have check:lint above this which actually lints the package, this command doesn't do anything

@@ -0,0 +1,4 @@
module.exports = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

added this config so I can locally run eslint, but as mentioned it won't do it in CI yet until I fix all the failures

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll leave it up to you, but in case we are not planning on fixing those failures any time soon, we might want to consider flagging what you said ☝️ with a comment, just in case someone wakes up one day with the urge of using this config 😅 . Again, abs up to you!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I plan on doing it myself soon, filed #6101

@@ -42,6 +42,7 @@ export function useRefreshableIframe(
second.removeEventListener("load", onLoadEvent);
};
}
// eslint-disable-next-line react-hooks/exhaustive-deps
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this one is a tricky one to fix, excluding it for now

Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to keep track of these somehow as to not forget to properly fix them at some point?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Filed #6101

@@ -69,6 +70,7 @@ export function useRefreshableIframe(
if (src) {
setUrl(src);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this one is a tricky one to fix, excluding it for now

Copy link
Contributor

Choose a reason for hiding this comment

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

same question here

Copy link
Contributor

@CarmenPopoviciu CarmenPopoviciu left a comment

Choose a reason for hiding this comment

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

Thank you for putting this up Sunil <3

@threepointone threepointone merged commit d0b4469 into main Jun 20, 2024
25 checks passed
@threepointone threepointone deleted the run-eslint-everywhere branch June 20, 2024 07:36
threepointone added a commit that referenced this pull request Jun 20, 2024
Followup from #6090, this enables typechecking and linting in kv-asset-handler, and fixes any failures.
threepointone added a commit that referenced this pull request Jun 20, 2024
Followup from #6090, this enables typechecking and linting in kv-asset-handler, and fixes any failures.
threepointone added a commit that referenced this pull request Jun 20, 2024
Followup from #6090, this enables typechecking and linting in kv-asset-handler, and fixes any failures.
threepointone added a commit that referenced this pull request Jun 20, 2024
Followup from #6090, this enables typechecking and linting in kv-asset-handler, and fixes any failures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants