Skip to content

chore(test): declare terminal testing-library dep and widen solid-test-render matcher - #420

Merged
omridevk merged 1 commit into
mainfrom
chore/417-review-followups
Aug 10, 2026
Merged

omridevk merged 1 commit into
mainfrom
chore/417-review-followups

Conversation

@omridevk

@omridevk omridevk commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Addresses two CodeRabbit findings from test(solid): migrate browser tests onto @solidjs/testing-library, lint-ban render from solid-js/web in tests (#389) #417.
  • packages/extensions/terminal/package.json: declares @solidjs/testing-library (same version pin as packages/ui-kit-chat) in devDependencies, since the package's vitest.config.ts calls ciTestSolidBrowser() whose setup file imports @solidjs/testing-library — an optional peer of @conciv/vitest-config — and under pnpm's strict resolution the consuming package must declare it directly.
  • packages/oxlint-plugin/src/solid-test-render.js: widens the TEST_FILE matcher to also catch .js/.jsx test files and .spec.* filenames (previously only .tsx? files under a test/ directory, or *.test.tsx?), so co-located .spec.tsx/.test.jsx files can't evade the rule.

Test plan

  • pnpm turbo run test --filter=@conciv/oxlint-plugin — added violation fixtures for a .spec.tsx and a .test.jsx filename outside a test/ directory, verified they fail against the pre-fix regex, pass after the fix, and fail again on revert.
  • pnpm turbo run typecheck --filter=@conciv/extension-terminal
  • pnpm exec fallow audit --format json --quiet --explain --gate-marker agent — zero introduced findings
  • pnpm lint / pnpm format:check (pre-existing unrelated .html format finding untouched by this branch)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved test detection for JavaScript files and .spec test filenames.
    • Added coverage for Solid.js render usage in test files outside the main test directory.
  • Tests
    • Added Solid.js fixtures validating rendering into dynamically created DOM hosts.
    • Expanded automated checks for .spec.tsx and .test.jsx files.
  • Chores
    • Updated tooling configuration to exclude fixture files from linting and test discovery.

…t-render matcher (#417 follow-up)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Solid render rule now matches JavaScript and spec test files. New external fixtures and tests verify diagnostics. Vitest and repository ignore configurations exclude the fixtures, and the terminal package declares the Solid testing dependency.

Changes

Solid render rule coverage

Layer / File(s) Summary
Rule matching and external fixtures
packages/oxlint-plugin/src/solid-test-render.js, packages/oxlint-plugin/fixtures/..., packages/oxlint-plugin/test/solid-test-render.test.ts
The rule matches .js, .jsx, .ts, and .tsx files with .test or .spec suffixes. External fixtures and tests verify diagnostics for .spec.tsx and .test.jsx files.
Test environment wiring
packages/oxlint-plugin/vitest.config.ts, packages/extensions/terminal/package.json
Vitest excludes the fixtures directory. The terminal package adds @solidjs/testing-library as a development dependency.
Repository ignore configuration
.fallowrc.json, .oxlintrc.json
Fallow and Oxlint ignore the plugin fixtures. Fallow also ignores @solidjs/testing-library while retaining react-grab.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes both primary changes: adding the terminal testing-library dependency and widening the Solid test-render matcher.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/417-review-followups

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (2)
packages/oxlint-plugin/test/solid-test-render.test.ts (1)

49-60: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add coverage for a plain .js test file.

The matcher change includes .js, but these tests cover only .spec.tsx and .test.jsx. Add one .test.js or .spec.js fixture and assert one conciv(solid-test-render) diagnostic. This verifies the plain JavaScript branch.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/oxlint-plugin/test/solid-test-render.test.ts` around lines 49 - 60,
Add a test case alongside the existing solid-test-render coverage using a plain
`.test.js` or `.spec.js` fixture outside the test directory. Invoke
`lintOutsideFixture` for that fixture and assert exactly one diagnostic
containing `conciv(solid-test-render)` (or the existing equivalent diagnostic
text), covering the matcher’s plain JavaScript branch.
.fallowrc.json (1)

87-88: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Scope the Fallow dependency exemption if possible.

ignoreDependencies is repository-wide. Line 88 disables dependency checks for @solidjs/testing-library in every package, although the PR objective identifies the terminal test configuration as the consumer. Prefer a package-scoped exception. If Fallow does not support one, document why the global exemption is safe and verify that it does not hide undeclared or unused uses elsewhere.

As per coding guidelines, audit changed code with Fallow and fix findings introduced by the changes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.fallowrc.json around lines 87 - 88, Scope the `@solidjs/testing-library`
exemption to the terminal test package instead of the repository-wide
ignoreDependencies entry, using Fallow’s supported package-level configuration.
If package scoping is unavailable, document why the global exemption is safe and
audit all packages to ensure it does not conceal undeclared or unused dependency
usage; run Fallow on the changed code and fix any introduced findings.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.fallowrc.json:
- Around line 87-88: Scope the `@solidjs/testing-library` exemption to the
terminal test package instead of the repository-wide ignoreDependencies entry,
using Fallow’s supported package-level configuration. If package scoping is
unavailable, document why the global exemption is safe and audit all packages to
ensure it does not conceal undeclared or unused dependency usage; run Fallow on
the changed code and fix any introduced findings.

In `@packages/oxlint-plugin/test/solid-test-render.test.ts`:
- Around line 49-60: Add a test case alongside the existing solid-test-render
coverage using a plain `.test.js` or `.spec.js` fixture outside the test
directory. Invoke `lintOutsideFixture` for that fixture and assert exactly one
diagnostic containing `conciv(solid-test-render)` (or the existing equivalent
diagnostic text), covering the matcher’s plain JavaScript branch.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0f97a4d0-4b34-462c-972b-508cc625fb80

📥 Commits

Reviewing files that changed from the base of the PR and between d332a6a and 29bbd2a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • .fallowrc.json
  • .oxlintrc.json
  • packages/extensions/terminal/package.json
  • packages/oxlint-plugin/fixtures/solid-test-render-outside/jsx-violation.test.jsx
  • packages/oxlint-plugin/fixtures/solid-test-render-outside/spec-violation.spec.tsx
  • packages/oxlint-plugin/src/solid-test-render.js
  • packages/oxlint-plugin/test/solid-test-render.test.ts
  • packages/oxlint-plugin/vitest.config.ts

@omridevk
omridevk merged commit b412200 into main Aug 10, 2026
26 checks passed
@omridevk
omridevk deleted the chore/417-review-followups branch August 10, 2026 23:38
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.

1 participant