Skip to content

Conversation

@saddlepaddle
Copy link
Collaborator

@saddlepaddle saddlepaddle commented Oct 6, 2025

Description

Fixes some import jankiness due to eslint and prettier having different formats they're expecting under the hood by disabling / adjusting some eslint rules.

Along with this, it finalizes the eslint and prettier setup and ensures it's consistent across all packages in the repo. It also removes husky since we'll rely on CI/CD to confirm the repo is up-to-date

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes


Important

Finalizes ESLint and Prettier configurations, removes Husky, and updates email template styling.

  • ESLint and Prettier Configuration:
    • Finalizes ESLint and Prettier setup across all packages, ensuring consistency.
    • Adds eslint.config.js to file-system package.
    • Integrates Prettier compatibility into shared lint setup in base.js.
    • Updates TypeScript import style rules in base.js.
    • Adds eslint-plugin-jsx-a11y and @tanstack/eslint-plugin-query to react.js.
  • Dependency Changes:
    • Removes Husky from package.json and bun.lock.
    • Adds eslint as a devDependency in file-system/package.json.
  • Email Template:
    • Standardizes class ordering in invite-user.tsx for consistent styling.

This description was created by Ellipsis for 5895e93. You can customize this summary. It will automatically update as commits are pushed.


Summary by CodeRabbit

  • New Features

    • Improved Invite User email: added invitation wording and a safety note for recipients.
  • Chores

    • Switched repository tooling: ESLint and Prettier alignment updates; added new linting plugins and configs.
    • Removed Husky pre-commit hook and related prepare script.
  • Style

    • Minor visual/class-order refinements in email templates for consistent rendering.
  • Chores

    • Expanded recommended VS Code extensions to include ESLint.

@vercel
Copy link

vercel bot commented Oct 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Oct 6, 2025 6:30pm
web Ready Ready Preview Comment Oct 6, 2025 6:30pm

@supabase
Copy link

supabase bot commented Oct 6, 2025

This pull request has been ignored for the connected project wowaemfasoptxrdjhilu because there are no changes detected in apps/backend/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai
Copy link

coderabbitai bot commented Oct 6, 2025

Walkthrough

Adds/upgrades ESLint configs and deps (shared tooling and per-package), updates VS Code recommendations, tweaks an email template's content and class ordering, and removes Husky pre-commit hooks and its prepare script from package.json.

Changes

Cohort / File(s) Summary of changes
Editor recommendations
/.vscode/extensions.json
Added dbaeumer.vscode-eslint to recommendations; adjusted array formatting/indentation.
Email template
/packages/email/src/templates/invite-user.tsx
Inserted invitation sentence and safety/contact paragraph; reordered Tailwind className segments and adjusted hr/border classes; minor reflow of Text blocks.
File-system package ESLint
/packages/file-system/eslint.config.js, /packages/file-system/package.json
Added eslint.config.js that imports and re-exports @onlook/eslint/base; changed package lint/format scripts to ESLint variants; added @onlook/eslint and [email protected] to devDependencies.
Shared ESLint base
/tooling/eslint/base.js
Imported node:path; added eslint-config-prettier to extends; changed @typescript-eslint/consistent-type-imports fixStyle to separate-type-imports; removed import/consistent-type-specifier-style rule.
Tooling ESLint deps
/tooling/eslint/package.json
Added @tanstack/eslint-plugin-query and eslint-plugin-jsx-a11y to dependencies.
Husky removal & hooks
/.husky/pre-commit, /package.json
Cleared pre-commit hook contents; removed prepare script and husky from devDependencies (disables Husky integration).
ESLint react config
/tooling/eslint/react.js
Registered @tanstack/query and jsx-a11y plugins and merged their recommended rules into the config.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer
  participant Git as Git
  participant Husky as Husky (pre-change)
  participant ESLint as ESLint/Formatter
  note over Dev,GIT: Before
  Dev->>Git: git commit
  Git->>Husky: run pre-commit
  Husky->>ESLint: run format & lint
  ESLint-->>Husky: pass/fail
  Husky-->>Git: allow or block commit

  note over Dev,GIT: After
  Dev->>Git: git commit
  Git-->>Dev: commit completes (no pre-commit hook)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • Kitenite

Poem

I hopped through lint rules, tidy and swift,
nudged an invite and gave classes a lift.
Husky packed up and waved a small paw,
commits now breeze by without any law.
🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title concisely summarizes the primary change of finalizing ESLint rules and follows the repository’s style for chore commits, making it clear and focused on the main update without unnecessary detail.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed The PR description provides a clear overview of the changes and their motivation but leaves several template sections blank or unfilled. It includes a well-written Description section but omits actual issue links under Related Issues, fails to check the Type of Change boxes, and provides no Testing steps. Despite these gaps, the core intent and scope are communicated effectively so the description is mostly complete.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch finalize-eslint-setup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4eb8330 and 5895e93.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (9)
  • .husky/pre-commit (0 hunks)
  • .vscode/extensions.json (1 hunks)
  • package.json (0 hunks)
  • packages/email/src/templates/invite-user.tsx (2 hunks)
  • packages/file-system/eslint.config.js (1 hunks)
  • packages/file-system/package.json (2 hunks)
  • tooling/eslint/base.js (2 hunks)
  • tooling/eslint/package.json (1 hunks)
  • tooling/eslint/react.js (2 hunks)
💤 Files with no reviewable changes (2)
  • package.json
  • .husky/pre-commit
🚧 Files skipped from review as they are similar to previous changes (3)
  • tooling/eslint/base.js
  • .vscode/extensions.json
  • packages/file-system/eslint.config.js
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Do not use the any type unless necessary

Files:

  • packages/email/src/templates/invite-user.tsx
{apps,packages}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Avoid using the any type unless absolutely necessary

Files:

  • packages/email/src/templates/invite-user.tsx
🔇 Additional comments (4)
tooling/eslint/package.json (1)

18-18: LGTM! Dependency additions align with ESLint finalization.

The addition of @tanstack/eslint-plugin-query (v5.62.0) and eslint-plugin-jsx-a11y (v6.10.2) properly supports the new plugin integrations in tooling/eslint/react.js. Both versions are stable and no security advisories are noted.

Based on learnings.

Also applies to: 22-22

tooling/eslint/react.js (1)

1-2: LGTM! Plugin integration follows best practices.

The integration of @tanstack/eslint-plugin-query and eslint-plugin-jsx-a11y is correctly implemented:

  • Plugins are properly imported and registered with standard naming conventions
  • Recommended rule sets are spread into the configuration, which is the advised baseline approach
  • The implementation follows ESLint flat config patterns

Based on learnings.

Also applies to: 14-15, 21-22

packages/file-system/package.json (1)

37-37: LGTM!

Adding @onlook/eslint and eslint@^9.0.0 as devDependencies correctly supports the new ESLint-based linting and formatting setup.

Also applies to: 41-41

packages/email/src/templates/invite-user.tsx (1)

38-76: LGTM! Formatting and content improvements.

The Tailwind className reordering throughout the component (lines 38, 39, 42, 46, 56, 62, 68, 69) is cosmetic and likely the result of auto-formatting by ESLint or Prettier plugins. This improves consistency without affecting functionality.

The content additions enhance the email template:

  • Line 51: Clearer invitation message ("has invited you to their project on Onlook.")
  • Lines 69-75: Improved safety guidance instructing recipients to reply if concerned about account safety

These changes improve both code consistency and user experience.

Comment on lines +16 to +17
"lint": "eslint . --max-warnings 0",
"format": "eslint --fix .",
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

Script changes align with ESLint-first approach.

The lint script now enforces zero warnings with --max-warnings 0, and the format script delegates formatting to ESLint (via --fix) instead of Prettier. This is consistent with the PR's goal of integrating eslint-config-prettier and consolidating on ESLint for both linting and formatting.

Verify that other packages in the monorepo follow the same pattern for lint and format scripts to ensure consistency:


🏁 Script executed:

#!/bin/bash
# Description: Check lint and format scripts across all packages

# Find all package.json files and extract their lint/format scripts
fd -t f '^package\.json$' packages apps | while read -r file; do
    echo "=== $file ==="
    jq -r '.scripts | select(. != null) | {lint: .lint, format: .format}' "$file"
    echo
done

Length of output: 10617


🏁 Script executed:

#!/bin/bash
# Description: Check lint and format scripts across all packages

fd -t f '^package\.json$' packages apps | while read -r file; do
  echo "=== $file ==="
  jq -r '
    .scripts? // {} |
    "lint: \(.lint // "N/A")\nformat: \(.format // "N/A")"
  ' "$file"
  echo
done

Length of output: 2251


Inconsistent scripts in monorepo
All packages under apps/web/client, preload, server and every packages/* use
"lint": "eslint . --max-warnings 0"
"format": "eslint --fix ."
but apps/backend/package.json and apps/web/package.json have no lint/format scripts. Add the same scripts there for consistency.

🤖 Prompt for AI Agents
In packages/file-system/package.json around lines 16 to 17, the repo expects
consistent npm scripts across the monorepo but this package.json contains only
"lint" and "format" while other top-level apps (apps/backend and apps/web) are
missing them; add "lint": "eslint . --max-warnings 0" and "format": "eslint
--fix ." to apps/backend/package.json and apps/web/package.json (or ensure their
package.json files include identical script entries) so all packages use the
same linting and formatting commands.

@saddlepaddle saddlepaddle merged commit 8f0870e into main Oct 6, 2025
8 checks passed
@Kitenite Kitenite deleted the finalize-eslint-setup branch October 6, 2025 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants