Repository navigation
chore(test): declare terminal testing-library dep and widen solid-test-render matcher - #420
Conversation
…t-render matcher (#417 follow-up) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe 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. ChangesSolid render rule coverage
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
packages/oxlint-plugin/test/solid-test-render.test.ts (1)
49-60: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd coverage for a plain
.jstest file.The matcher change includes
.js, but these tests cover only.spec.tsxand.test.jsx. Add one.test.jsor.spec.jsfixture and assert oneconciv(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 winScope the Fallow dependency exemption if possible.
ignoreDependenciesis repository-wide. Line 88 disables dependency checks for@solidjs/testing-libraryin 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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (8)
.fallowrc.json.oxlintrc.jsonpackages/extensions/terminal/package.jsonpackages/oxlint-plugin/fixtures/solid-test-render-outside/jsx-violation.test.jsxpackages/oxlint-plugin/fixtures/solid-test-render-outside/spec-violation.spec.tsxpackages/oxlint-plugin/src/solid-test-render.jspackages/oxlint-plugin/test/solid-test-render.test.tspackages/oxlint-plugin/vitest.config.ts
Summary
packages/extensions/terminal/package.json: declares@solidjs/testing-library(same version pin aspackages/ui-kit-chat) in devDependencies, since the package'svitest.config.tscallsciTestSolidBrowser()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 theTEST_FILEmatcher to also catch.js/.jsxtest files and.spec.*filenames (previously only.tsx?files under atest/directory, or*.test.tsx?), so co-located.spec.tsx/.test.jsxfiles can't evade the rule.Test plan
pnpm turbo run test --filter=@conciv/oxlint-plugin— added violation fixtures for a.spec.tsxand a.test.jsxfilename outside atest/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-terminalpnpm exec fallow audit --format json --quiet --explain --gate-marker agent— zero introduced findingspnpm lint/pnpm format:check(pre-existing unrelated.htmlformat finding untouched by this branch)🤖 Generated with Claude Code
Summary by CodeRabbit
.spectest filenames..spec.tsxand.test.jsxfiles.