Skip to content

Fixed pre-commit lint hook for Tailwind v4 workspaces#26970

Open
kevinansfield wants to merge 1 commit intomainfrom
fix-lint-staged-tw4
Open

Fixed pre-commit lint hook for Tailwind v4 workspaces#26970
kevinansfield wants to merge 1 commit intomainfrom
fix-lint-staged-tw4

Conversation

@kevinansfield
Copy link
Copy Markdown
Member

no issue

Added apps/posts and apps/shade to scoped workspaces in .lintstagedrc.cjs so eslint runs from within each package directory. This fixes the pre-commit hook failing because eslint-plugin-tailwindcss (via tailwind-api-utils) tries to require tailwindcss/dist/lib/setupContextUtils.js which only exists in Tailwind v3.

Renamed the constant from FLAT_CONFIG_WORKSPACES to SCOPED_WORKSPACES since it now includes non-flat-config packages too.

Added apps/posts and apps/shade to scoped workspaces in lint-staged config
so eslint runs from within each package directory, where eslint-plugin-tailwindcss
can correctly resolve Tailwind v4 modules.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5fb611dd-4586-4676-b332-70a2baff10bf

📥 Commits

Reviewing files that changed from the base of the PR and between b3bd8d1 and 46f9881.

📒 Files selected for processing (1)
  • .lintstagedrc.cjs

Walkthrough

The .lintstagedrc.cjs lint-staged configuration was updated to rename an internal constant from FLAT_CONFIG_WORKSPACES to SCOPED_WORKSPACES and expanded its scope to include four workspaces: e2e, apps/admin, apps/posts, and apps/shade. Previously, it only included e2e and apps/admin. All related logic that processes workspace grouping, determines file-to-workspace mappings, and generates per-workspace ESLint commands now iterates over the updated constant, routing files from the newly added workspaces to scoped ESLint runs.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing a pre-commit lint hook issue for Tailwind v4 workspaces by adding new workspace scopes to the lint-staged configuration.
Description check ✅ Passed The description is directly related to the changeset, explaining why the workspaces were added (Tailwind v4 compatibility issue) and documenting the constant rename.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-lint-staged-tw4

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

@kevinansfield kevinansfield requested a review from 9larsons March 25, 2026 21:29
@kevinansfield kevinansfield added the ok to merge for me You can merge this on my behalf if you want. label Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok to merge for me You can merge this on my behalf if you want.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant