Repository navigation
feat: add no-check and expect-error properties to example fences - #319
Conversation
🦋 Changeset detectedLatest commit: d992e8a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 8 minutes. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (5)
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. Comment |
|
View your CI Pipeline Execution ↗ for commit 790d461
☁️ Nx Cloud last updated this comment at |
commit: |
…operties # Conflicts: # packages/intent/tests/validate-blocks.test.ts
🎯 Changes
intent validatetypechecks everyts,tsx,js, andjsxfence in a skill. The only way to exclude one example was to relabel it astextordiff, which removes the language from a valid teaching example. Two kinds of example need a different treatment:return, is not a complete source file and cannot compile.Wrong:example is supposed to fail. Nothing reported it when a library change made it compile.A property after the fence language now controls how that one example is checked:
```ts no-check```ts expect-error```ts expect-error=TS2322An
expect-errorexample reports nothing else; its errors and deprecation warnings are the expected result. When the expectation is not met, the error names the fence line:Errors that Intent already tolerates in partial examples, such as an undeclared name, do not count as the expected error. A syntax error satisfies the plain
expect-error, so the coded form is the way to require a specific failure.Both properties work with the TypeScript 6 and TypeScript 7 compiler paths. A fence without a property behaves as before.