-
Notifications
You must be signed in to change notification settings - Fork 325
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: prettier and vitest config simplification #1117
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
|
WalkthroughThis pull request involves updates to the project's configuration files, focusing on dependency management and testing setup. The changes include removing certain Prettier-related dependencies from the root Changes
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
📦 Bundle size comparison
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
tooling/eslint-plugin/package.json (1)
9-9
: Reduced scripts section.Removing build scripts helps streamline library maintenance. Make sure your code is thoroughly tested in its raw
.js
form to avoid potential runtime issues.🧰 Tools
🪛 GitHub Actions: Publish Test Releases
[error] Lock file (pnpm-lock.yaml) is out of sync with package.json. Package specifications in lockfile don't match package.json. Missing entries for '@uploadthing/tsconfig', 'tsup', and 'typescript' in package.json.
🪛 GitHub Actions: Examples E2E
[error] Lock file is out of sync with package.json. Package specifiers in pnpm-lock.yaml don't match package.json. Missing entries in package.json for: @uploadthing/tsconfig, tsup, and typescript.
🪛 GitHub Actions: CI
[error] Lock file is out of sync with package.json. Package specifiers in pnpm-lock.yaml don't match package.json. Missing entries in package.json for: @uploadthing/tsconfig, tsup, and typescript.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
tooling/eslint-plugin/index.js
(1 hunks)tooling/eslint-plugin/package.json
(1 hunks)tooling/eslint-plugin/rules/no-hardcoded-version-in-test.js
(1 hunks)tooling/eslint-plugin/rules/no-throwing-promises.js
(1 hunks)tooling/eslint-plugin/tsconfig.json
(0 hunks)tooling/eslint-plugin/tsup.config.ts
(0 hunks)
💤 Files with no reviewable changes (2)
- tooling/eslint-plugin/tsup.config.ts
- tooling/eslint-plugin/tsconfig.json
✅ Files skipped from review due to trivial changes (1)
- tooling/eslint-plugin/index.js
🧰 Additional context used
🪛 GitHub Actions: Publish Test Releases
tooling/eslint-plugin/package.json
[error] Lock file (pnpm-lock.yaml) is out of sync with package.json. Package specifications in lockfile don't match package.json. Missing entries for '@uploadthing/tsconfig', 'tsup', and 'typescript' in package.json.
🪛 GitHub Actions: Examples E2E
tooling/eslint-plugin/package.json
[error] Lock file is out of sync with package.json. Package specifiers in pnpm-lock.yaml don't match package.json. Missing entries in package.json for: @uploadthing/tsconfig, tsup, and typescript.
🪛 GitHub Actions: CI
tooling/eslint-plugin/package.json
[error] Lock file is out of sync with package.json. Package specifiers in pnpm-lock.yaml don't match package.json. Missing entries in package.json for: @uploadthing/tsconfig, tsup, and typescript.
🔇 Additional comments (9)
tooling/eslint-plugin/rules/no-throwing-promises.js (3)
1-2
: Good use of JSDoc Type Checking.Enabling
// @ts-check
in a JavaScript file is a great step toward better type safety. Ensure that your project's tooling is configured to correctly parse and validate JSDoc annotations across all relevant files, so that any type mismatches are flagged early.
5-8
: Typedef approach is consistent but verify usage across the ESLint plugin.Defining
@typedef {import("@typescript-eslint/utils").TSESTree.Node}
is helpful for type clarity. Confirm that all other rule files reference the same typedef or a shared definition to maintain consistency throughout the ESLint plugin.
13-17
: Parameter type removed from the function signature.The inline TypeScript annotation was removed in favor of JSDoc. This is fine in a
// @ts-check
environment but double-check that your code editor or build pipeline properly infers the type from the JSDoc comments to avoid losing IntelliSense or type-checking benefits.tooling/eslint-plugin/rules/no-hardcoded-version-in-test.js (4)
1-2
: Enforce consistent type-checking approach.Adding
// @ts-check
enables type-checking in a JavaScript file, which can prevent subtle bugs. Ensure that all files in this ESLint plugin follow a consistent approach (e.g., enabling or disablingts-check
) to maintain uniformity.
5-7
: Good use of JSDoc typedef for TSESTree.Node.This clarifies the type reference without requiring TypeScript import statements. It simplifies code while retaining the type-checking benefits.
9-15
: Clear JSDoc for findUp function.Excellent detail in JSDoc describing the
node
parameter, thepredicate
parameter, and the return type. This improves maintainability and discoverability for future contributors.
16-18
: Replace TypeScript parameter types with JSDoc.The updated signature and inline
/** @type {TSESTree.Node | undefined} */
annotation preserves type safety while removing the direct TS for function parameters. This is consistent with the new module approach.tooling/eslint-plugin/package.json (2)
4-4
: Enabling ECMAScript module format.Adding
"type": "module"
ensures that files in this package are treated as ECMAScript modules. This is a beneficial move toward a more modern JavaScript ecosystem, but confirm that consumers of this plugin can handle the ESM format.Do you want a script to confirm that consuming projects properly support ESM files?
🧰 Tools
🪛 GitHub Actions: Publish Test Releases
[error] Lock file (pnpm-lock.yaml) is out of sync with package.json. Package specifications in lockfile don't match package.json. Missing entries for '@uploadthing/tsconfig', 'tsup', and 'typescript' in package.json.
🪛 GitHub Actions: Examples E2E
[error] Lock file is out of sync with package.json. Package specifiers in pnpm-lock.yaml don't match package.json. Missing entries in package.json for: @uploadthing/tsconfig, tsup, and typescript.
🪛 GitHub Actions: CI
[error] Lock file is out of sync with package.json. Package specifiers in pnpm-lock.yaml don't match package.json. Missing entries in package.json for: @uploadthing/tsconfig, tsup, and typescript.
6-6
: Simplified exports object.Refactoring the
"exports"
field to point directly toindex.js
keeps the structure simpler. Verify that these changes still allow ESLint to load the rule properly.🧰 Tools
🪛 GitHub Actions: Publish Test Releases
[error] Lock file (pnpm-lock.yaml) is out of sync with package.json. Package specifications in lockfile don't match package.json. Missing entries for '@uploadthing/tsconfig', 'tsup', and 'typescript' in package.json.
🪛 GitHub Actions: Examples E2E
[error] Lock file is out of sync with package.json. Package specifiers in pnpm-lock.yaml don't match package.json. Missing entries in package.json for: @uploadthing/tsconfig, tsup, and typescript.
🪛 GitHub Actions: CI
[error] Lock file is out of sync with package.json. Package specifiers in pnpm-lock.yaml don't match package.json. Missing entries in package.json for: @uploadthing/tsconfig, tsup, and typescript.
Summary by CodeRabbit
Chores
@uploadthing/prettier-config
for consistent code formattingTooling