Skip to content

feat: add spell checking#3127

Merged
LuLaValva merged 4 commits intomainfrom
spell-check
Mar 12, 2026
Merged

feat: add spell checking#3127
LuLaValva merged 4 commits intomainfrom
spell-check

Conversation

@LuLaValva
Copy link
Copy Markdown
Member

Add spell checking, and correct some misspellings.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 10, 2026

⚠️ No Changeset found

Latest commit: d75b9b5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 10, 2026

Walkthrough

Adds 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)

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 (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add spell checking' directly and clearly describes the main change in the pull request: adding spell-checking capabilities via cspell configuration.
Description check ✅ Passed The description 'Add spell checking, and correct some misspellings' is directly related to the changeset, accurately summarizing both the addition of spell-checking infrastructure and the accompanying typo corrections throughout the codebase.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch spell-check
📝 Coding Plan
  • Generate coding plan for human review comments

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

Tip

You can customize the high-level summary generated by CodeRabbit.

Configure the reviews.high_level_summary_instructions setting to provide custom instructions for generating the high-level summary.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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 | 🟠 Major

Test 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

📥 Commits

Reviewing files that changed from the base of the PR and between 1ee9ec8 and 68c9416.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json and included by **
  • packages/runtime-class/src/node_modules/@internal/components-define-widget-legacy/index-browser.js is excluded by !**/node_modules/** and included by **
📒 Files selected for processing (19)
  • cspell.json
  • package.json
  • packages/compiler/src/taglib/loader/loadTaglibFromProps.js
  • packages/runtime-class/docs/class-components.md
  • packages/runtime-class/docs/troubleshooting-streaming.md
  • packages/runtime-class/index.d.ts
  • packages/runtime-class/src/runtime/components/renderer.js
  • packages/runtime-class/src/taglib/index.js
  • packages/runtime-class/src/translator/taglib/core/index.js
  • packages/runtime-class/src/translator/taglib/core/transform-style.js
  • packages/runtime-class/tags-html.d.ts
  • packages/runtime-tags/index.d.ts
  • packages/runtime-tags/src/__tests__/main.test.ts
  • packages/runtime-tags/src/__tests__/serializer.test.ts
  • packages/runtime-tags/src/html/dynamic-tag.ts
  • packages/runtime-tags/src/translator/util/known-tag.ts
  • packages/runtime-tags/src/translator/util/signals.ts
  • packages/runtime-tags/src/translator/visitors/tag/custom-tag.ts
  • packages/runtime-tags/tags-html.d.ts

Comment thread package.json Outdated
Comment thread packages/runtime-class/index.d.ts
Comment thread packages/runtime-class/src/taglib/index.js
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
package.json (1)

20-20: ⚠️ Potential issue | 🟠 Major

Spellcheck is still not enforced in CI.

Line 20 updates local lint, but @ci:lint (Line 9) still skips cspell, 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.

words currently 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

📥 Commits

Reviewing files that changed from the base of the PR and between 68c9416 and 0da3622.

📒 Files selected for processing (4)
  • cspell.json
  • package.json
  • packages/compiler/src/taglib/loader/loadAttributeFromProps.js
  • packages/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
Copy link
Copy Markdown

codecov Bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.37%. Comparing base (1eca6d0) to head (d75b9b5).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@LuLaValva LuLaValva merged commit c947d1f into main Mar 12, 2026
11 checks passed
@DylanPiercey DylanPiercey deleted the spell-check branch March 12, 2026 21:21
@github-project-automation github-project-automation Bot moved this from Todo to Done in Roadmap Mar 12, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Roadmap Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants