Skip to content

Add Propel Oxlint rule for Tailwind shorthand#112

Merged
lifeiscontent merged 1 commit into
mainfrom
propel-oxlint-tailwind-shorthand
Jun 17, 2026
Merged

Add Propel Oxlint rule for Tailwind shorthand#112
lifeiscontent merged 1 commit into
mainfrom
propel-oxlint-tailwind-shorthand

Conversation

@lifeiscontent

Copy link
Copy Markdown
Collaborator

Summary

  • add a workspace Oxlint plugin package for Propel-specific lint rules
  • enforce Tailwind v4 shorthand forms for simple CSS variable arbitrary values and presence-only data variants
  • apply the shorthand fixes across component class strings
  • keep Storybook/Vitest coverage dependency and interaction test fixes in the branch

Validation

  • vp install
  • vp check
  • vp test
  • vp run --filter oxlint-plugin-propel check
  • vp run --filter oxlint-plugin-propel test

Copilot AI review requested due to automatic review settings June 17, 2026 09:38
@github-actions

Copy link
Copy Markdown

📚 Storybook preview: https://pr-112-propel-storybook.vamsi-906.workers.dev

@lifeiscontent lifeiscontent merged commit 7cc6cd5 into main Jun 17, 2026
3 checks passed
@lifeiscontent lifeiscontent deleted the propel-oxlint-tailwind-shorthand branch June 17, 2026 09:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a project-specific Oxlint plugin to enforce Tailwind CSS v4 shorthand forms (CSS var arbitrary values + presence-only data-* variants), wires it into the workspace lint config, and applies the resulting shorthand updates across Propel components. The branch also keeps Storybook interaction-test stability improvements and Vitest coverage dependency updates.

Changes:

  • Introduce tools/oxlint-plugin-propel with the propel/prefer-tailwind-v4-shorthand rule + unit tests.
  • Enable the rule in the root vite.config.ts and apply shorthand rewrites across component class strings.
  • Update Storybook interaction tests to use more robust portal queries; add Vitest coverage dependency and lockfile updates.

Reviewed changes

Copilot reviewed 30 out of 31 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
vite.config.ts Registers the local Oxlint plugin and enables the new Propel rule.
tools/oxlint-plugin-propel/vite.config.ts Adds Vite+ config for building/linting/formatting the plugin package.
tools/oxlint-plugin-propel/tsconfig.json TypeScript config for the new Oxlint plugin package.
tools/oxlint-plugin-propel/tests/index.test.ts RuleTester-based unit tests for the new rule + autofix output.
tools/oxlint-plugin-propel/src/index.ts Implements the prefer-tailwind-v4-shorthand rule and exports the plugin.
tools/oxlint-plugin-propel/README.md Documents the rule behavior and local jsPlugins setup.
tools/oxlint-plugin-propel/package.json Declares the new workspace-private plugin package and its dependencies.
tools/oxlint-plugin-propel/.gitignore Ignores build output and local artifacts for the plugin package.
pnpm-lock.yaml Adds the new tool package and updates dependency graph (Vitest coverage-related).
packages/propel/src/internal/scrollbar.ts Converts presence-only data variants to Tailwind v4 shorthand.
packages/propel/src/internal/node-slot.ts Converts CSS var arbitrary values to Tailwind v4 shorthand.
packages/propel/src/components/toolbar/index.tsx Converts presence-only data variants to shorthand.
packages/propel/src/components/toast/toast.stories.tsx Makes portal assertions more robust via findByRole with name scoping.
packages/propel/src/components/toast/index.tsx Converts data-[ending] variant to shorthand.
packages/propel/src/components/tabs/index.tsx Converts data-[active] / group-data-[active] to shorthand.
packages/propel/src/components/table/index.tsx Converts data-[popup-open] to shorthand.
packages/propel/src/components/switch/index.tsx Converts `data-[checked
packages/propel/src/components/search/index.tsx Converts data-[expanded] / not-data-[expanded] to shorthand.
packages/propel/src/components/radio/index.tsx Converts `data-[checked
packages/propel/src/components/pill/index.tsx Converts CSS var and data-[pressed] variants to shorthand.
packages/propel/src/components/pagination/pagination.stories.tsx Reduces flake by waiting on portaled menuitems and highlighting state.
packages/propel/src/components/nav-item/index.tsx Converts `data-[active
packages/propel/src/components/icon-button/index.tsx Converts CSS var arbitrary value to shorthand.
packages/propel/src/components/checkbox/index.tsx Converts presence-only data-* variants to shorthand, including stacked variants.
packages/propel/src/components/checkbox/checkbox.stories.tsx Updates test assertions to match new shorthand class names.
packages/propel/src/components/button/index.tsx Converts CSS var arbitrary value to shorthand.
packages/propel/src/components/breadcrumb/index.tsx Converts `data-[popup-open
packages/propel/src/components/breadcrumb/breadcrumb.stories.tsx Updates portal queries and menu close assertions for stability.
packages/propel/src/components/accordion/index.tsx Converts CSS var arbitrary value + presence-only data variants to shorthand.
packages/propel/src/components/accordion/accordion.stories.tsx Updates documentation comment to match shorthand form.
packages/propel/package.json Adds @vitest/coverage-v8 dev dependency.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file
Comments suppressed due to low confidence (1)

packages/propel/package.json:88

  • @vitest/coverage-v8 is pinned to 4.1.8 while vitest is pinned to 4.1.9 in this package. In the lockfile this results in an additional vitest@4.1.8 install to satisfy peers, which can be confusing and can lead to subtle mismatches in coverage tooling. Consider aligning the @vitest/coverage-v8 version with the vitest version used by this package (or vice-versa) so only one Vitest version is required.
    "@types/react": "^19.2.17",
    "@types/react-dom": "^19.2.3",
    "@typescript/native-preview": "7.0.0-dev.20260509.2",
    "@vitest/browser-playwright": "4.1.9",
    "@vitest/coverage-v8": "4.1.8",
    "playwright": "^1.61.0",
    "react": "^19.2.7",
    "react-dom": "^19.2.7",
    "storybook": "^10.4.5",
    "storybook-addon-pseudo-states": "^10.4.5",
    "tailwindcss": "^4.3.1",
    "typescript": "^6.0.3",
    "vite-plus": "catalog:",
    "vitest": "4.1.9",
    "wrangler": "4.100.0"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +45 to +53
docs: {
description:
"Prefer Tailwind CSS v4 shorthand syntax for simple arbitrary values and data variants.",
recommended: true,
},
fixable: "code",
messages: {
preferTailwindV4Shorthand: "Use Tailwind CSS v4 shorthand syntax for this class string.",
},
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