Conversation
|
WalkthroughAdds a cspell.json configuration and updates package.json to run cspell in the lint script. Applies many non-functional text fixes across the codebase: comment and documentation typos, string literal corrections, and several local variable/parameter renames. One serializer test expectation was adjusted to include preserved whitespace from stream chunks. No API signatures or runtime behavior changes. 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment Tip You can customize the high-level summary generated by CodeRabbit.Configure the |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/runtime-tags/src/__tests__/serializer.test.ts (1)
1246-1264:⚠️ Potential issue | 🟠 MajorTest expectation mismatch: byte arrays don't include trailing space bytes.
The input strings were changed to include trailing spaces (
"first ","second "), but the expected byte arrays on lines 1259-1261 were not updated:
"first "should encode to[102,105,114,115,116,32](includes space byte 32)- Current expectation on line 1259:
[102,105,114,115,116](no space byte)Similarly for
"second ". This test will fail because the actual encoded output won't match the expected byte arrays.🐛 Proposed fix to include space bytes in expectations
const [result] = await serializer.assertStringify( response, `new Response(new ReadableStream({start(c){(async(_,f,v,l,i,p=a=>l=new Promise((r,j)=>{f=_.r=r;_.j=j}),a=((_.f=v=>{f(v);a.push(p())}),[p()]))=>{for(i of a)v=await i,i==l?c.close():c.enqueue(v)})(_.a={}).catch(e=>c.error(e))}}))`, - `_.a.f(_.c=new Uint8Array([102,105,114,115,116]))`, - `_.a.f(_.d=new Uint8Array([115,101,99,111,110,100]))`, + `_.a.f(_.c=new Uint8Array([102,105,114,115,116,32]))`, + `_.a.f(_.d=new Uint8Array([115,101,99,111,110,100,32]))`, `_.a.f(_.e=new Uint8Array([116,104,105,114,100])),_.a.r()`, );🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/runtime-tags/src/__tests__/serializer.test.ts` around lines 1246 - 1264, The expected byte arrays in the test assertStringify are missing the trailing space byte (32) for the inputs "first " and "second "; update the two expected Uint8Array literals used in the assertions (_.a.f(_.c=new Uint8Array([102,105,114,115,116])) and _.a.f(_.d=new Uint8Array([115,101,99,111,110,100]))) to include 32 at the end (i.e. [102,105,114,115,116,32] and [115,101,99,111,110,100,32]) so they match the actual encoder.encode outputs, leaving the third array (_.e) unchanged.
🧹 Nitpick comments (1)
cspell.json (1)
1-381: LGTM with minor note: duplicate dictionary entries.The cspell configuration looks good overall. A few words appear twice in the dictionary and could be deduplicated for cleanliness:
weakmaps(lines 75, 95)newcap(lines 91, 333)keygen(lines 40, 265)This doesn't affect functionality but could be cleaned up.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cspell.json` around lines 1 - 381, The cspell.json words array contains duplicate entries (notably "weakmaps", "newcap", and "keygen"); remove the duplicate occurrences so each word appears only once in the words list (leave a single canonical instance of each), save the updated cspell.json, and run your repo spell/lint check to confirm no functional change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Line 20: The package.json "lint" script only runs cspell for .md and .ts and
is not included in the "@ci:lint" pipeline, so spell-checking is inconsistent;
update package.json to (1) add the same cspell invocation to the "@ci:lint"
script (or make both scripts call a shared script name like "check:spell") and
(2) broaden the cspell glob (e.g., include **/*.{md,ts,js,json,marko} or a
repo-wide pattern) so .js and .json files are checked; ensure the CI script uses
the same flags (like --with-node-modules and --log-level=warn) so behavior
matches local "lint".
In `@packages/runtime-class/index.d.ts`:
- Around line 248-250: The JSDoc line "processed up by the
`@marko/language-tools`" has a typo; update the declaration comment above the
inlined types so it reads either "picked up by the `@marko/language-tools`" or
"processed by the `@marko/language-tools`" (e.g., in the comment block that
explains how the types are handled/inlined into the compiled template).
In `@packages/runtime-class/src/taglib/index.js`:
- Line 37: Update the debug message so it references the actual wrapper API name
`lookup.buildLookup` instead of `buildTaglibLookup`; locate the string currently
emitted under `MARKO_DEBUG` and change the guidance to mention calling
`lookup.buildLookup(dir, require('marko/translator'))` (or similar) so the
warning correctly points to `lookup.buildLookup`.
---
Outside diff comments:
In `@packages/runtime-tags/src/__tests__/serializer.test.ts`:
- Around line 1246-1264: The expected byte arrays in the test assertStringify
are missing the trailing space byte (32) for the inputs "first " and "second ";
update the two expected Uint8Array literals used in the assertions
(_.a.f(_.c=new Uint8Array([102,105,114,115,116])) and _.a.f(_.d=new
Uint8Array([115,101,99,111,110,100]))) to include 32 at the end (i.e.
[102,105,114,115,116,32] and [115,101,99,111,110,100,32]) so they match the
actual encoder.encode outputs, leaving the third array (_.e) unchanged.
---
Nitpick comments:
In `@cspell.json`:
- Around line 1-381: The cspell.json words array contains duplicate entries
(notably "weakmaps", "newcap", and "keygen"); remove the duplicate occurrences
so each word appears only once in the words list (leave a single canonical
instance of each), save the updated cspell.json, and run your repo spell/lint
check to confirm no functional change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2ef02ff4-ff31-4c35-b293-037300be20db
⛔ Files ignored due to path filters (2)
package-lock.jsonis excluded by!**/package-lock.jsonand included by**packages/runtime-class/src/node_modules/@internal/components-define-widget-legacy/index-browser.jsis excluded by!**/node_modules/**and included by**
📒 Files selected for processing (19)
cspell.jsonpackage.jsonpackages/compiler/src/taglib/loader/loadTaglibFromProps.jspackages/runtime-class/docs/class-components.mdpackages/runtime-class/docs/troubleshooting-streaming.mdpackages/runtime-class/index.d.tspackages/runtime-class/src/runtime/components/renderer.jspackages/runtime-class/src/taglib/index.jspackages/runtime-class/src/translator/taglib/core/index.jspackages/runtime-class/src/translator/taglib/core/transform-style.jspackages/runtime-class/tags-html.d.tspackages/runtime-tags/index.d.tspackages/runtime-tags/src/__tests__/main.test.tspackages/runtime-tags/src/__tests__/serializer.test.tspackages/runtime-tags/src/html/dynamic-tag.tspackages/runtime-tags/src/translator/util/known-tag.tspackages/runtime-tags/src/translator/util/signals.tspackages/runtime-tags/src/translator/visitors/tag/custom-tag.tspackages/runtime-tags/tags-html.d.ts
There was a problem hiding this comment.
♻️ Duplicate comments (1)
package.json (1)
20-20:⚠️ Potential issue | 🟠 MajorSpellcheck is still not enforced in CI.
Line 20 updates local
lint, but@ci:lint(Line 9) still skipscspell, so failures can be missed in CI.🔧 Suggested wiring
- "@ci:lint": "eslint --format unix . && prettier . --check --with-node-modules --log-level=warn", + "@ci:lint": "npm run lint",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` at line 20, The CI lint script still skips spellcheck; update the package.json script named "@ci:lint" to include cspell (or simply invoke the existing "lint" script) so CI runs the same checks as local linting—modify the "@ci:lint" entry to append the cspell command used in "lint" (cspell "**/*.{md,ts,js,marko}") or replace its command with npm/yarn run lint to ensure spellcheck is enforced in CI.
🧹 Nitpick comments (1)
cspell.json (1)
40-40: Deduplicate repeated dictionary entries.
wordscurrently repeats a few entries (keygen,weakmaps,newcap). This is harmless but adds churn when maintaining the list.🧹 Proposed cleanup
- "weakmaps", @@ - "keygen", @@ - "newcap",Also applies to: 75-75, 91-91, 95-95, 265-265, 333-333
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cspell.json` at line 40, The cspell dictionary contains duplicate entries (e.g., "keygen", "weakmaps", "newcap") in the "words" array; remove the repeated strings so each word appears only once. Locate the "words" array in cspell.json and deduplicate its items (you can sort or run a uniqueness filter) ensuring entries referenced in the comment (keygen, weakmaps, newcap and the other noted indexes) are present only a single time.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@package.json`:
- Line 20: The CI lint script still skips spellcheck; update the package.json
script named "@ci:lint" to include cspell (or simply invoke the existing "lint"
script) so CI runs the same checks as local linting—modify the "@ci:lint" entry
to append the cspell command used in "lint" (cspell "**/*.{md,ts,js,marko}") or
replace its command with npm/yarn run lint to ensure spellcheck is enforced in
CI.
---
Nitpick comments:
In `@cspell.json`:
- Line 40: The cspell dictionary contains duplicate entries (e.g., "keygen",
"weakmaps", "newcap") in the "words" array; remove the repeated strings so each
word appears only once. Locate the "words" array in cspell.json and deduplicate
its items (you can sort or run a uniqueness filter) ensuring entries referenced
in the comment (keygen, weakmaps, newcap and the other noted indexes) are
present only a single time.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bec5de36-9cb8-473c-9d5b-947c89e467ba
📒 Files selected for processing (4)
cspell.jsonpackage.jsonpackages/compiler/src/taglib/loader/loadAttributeFromProps.jspackages/runtime-tags/src/__tests__/serializer.test.ts
✅ Files skipped from review due to trivial changes (1)
- packages/compiler/src/taglib/loader/loadAttributeFromProps.js
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/runtime-tags/src/tests/serializer.test.ts
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3127 +/- ##
=======================================
Coverage 89.37% 89.37%
=======================================
Files 369 369
Lines 47034 47035 +1
Branches 4259 4259
=======================================
+ Hits 42036 42037 +1
Misses 4946 4946
Partials 52 52 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add spell checking, and correct some misspellings.