Skip to content

feat: add spell checking#185

Merged
LuLaValva merged 1 commit intomainfrom
spell-check
Mar 23, 2026
Merged

feat: add spell checking#185
LuLaValva merged 1 commit intomainfrom
spell-check

Conversation

@LuLaValva
Copy link
Copy Markdown
Member

Add spell checking to the pre-commit, and corrected spelling errors throughout the repo

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 10, 2026

⚠️ No Changeset found

Latest commit: b20735e

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

This pull request introduces spell-checking infrastructure and fixes numerous typos and spelling errors across the codebase. A new cspell.json configuration file is added with vocabulary definitions and file/directory specifications. The package.json is updated to include cspell as a dev dependency and add spell-checking to the lint script. Multiple README files are corrected for typos and logo URL references. Source code files receive fixes for misspelled variable names, import aliases, method parameters, and comments. Component templates and test files are also updated with spelling corrections, and a constant identifier is renamed for consistency.

🚥 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' accurately describes the main objective of the pull request - introducing spell-checking functionality and fixing spelling errors across the codebase.
Description check ✅ Passed The description 'Add spell checking to the pre-commit, and corrected spelling errors throughout the repo' directly aligns with the changeset, which includes cspell configuration, lint script updates, and numerous spelling corrections across multiple files.

✏️ 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

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

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: 2

🧹 Nitpick comments (1)
cspell.json (1)

41-41: Consider expanding file patterns for monorepo coverage.

The current pattern ["*", "src/**/*"] may not cover source files under packages/*/src/. For a monorepo structure, consider:

-  "files": ["*", "src/**/*"],
+  "files": ["*", "src/**/*", "packages/**/*"],

Alternatively, use **/* to cover all files and rely on ignorePaths for exclusions.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cspell.json` at line 41, Update the cspell.json "files" patterns to cover
monorepo packages by adding a pattern such as "packages/*/src/**/*" (or replace
with a broader "**/*" and rely on ignorePaths) so source files under
packages/*/src/ are linted; modify the "files" array entry that currently
contains ["*", "src/**/*"] to include the new pattern or the global pattern
accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@cspell.json`:
- Line 38: Remove the unused whitelist entry "Broutes" from cspell.json because
it's a typo and not referenced by active code; locate the "Broutes" string in
cspell.json and delete that array element so the spellchecker no longer ignores
this nonexistent token (no other code changes required).

In `@package.json`:
- Line 19: The CI lint script (`@ci`:lint) is missing the cspell check so CI can
miss spelling issues; update the "@ci:lint" script to include the same cspell
invocation used by "lint" (e.g., add cspell "**/*.{md,ts,marko}" with the same
flags) so `@ci`:lint and lint run identical checks; locate the package.json
scripts object and modify the "@ci:lint" entry to mirror the "lint" entry
(including eslint, prettier checks, and the cspell command and options).

---

Nitpick comments:
In `@cspell.json`:
- Line 41: Update the cspell.json "files" patterns to cover monorepo packages by
adding a pattern such as "packages/*/src/**/*" (or replace with a broader "**/*"
and rely on ignorePaths) so source files under packages/*/src/ are linted;
modify the "files" array entry that currently contains ["*", "src/**/*"] to
include the new pattern or the global pattern accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f2030974-a3b2-4401-b11a-bfa338fff508

📥 Commits

Reviewing files that changed from the base of the PR and between fdd6ce6 and b20735e.

⛔ Files ignored due to path filters (2)
  • assets/marko-run-dark.png is excluded by !**/*.png and included by **
  • package-lock.json is excluded by !**/package-lock.json and included by **
📒 Files selected for processing (19)
  • cspell.json
  • package.json
  • packages/adapters/netlify/README.md
  • packages/adapters/netlify/src/index.ts
  • packages/adapters/node/README.md
  • packages/adapters/static/README.md
  • packages/explorer/src/routes/+layout.marko
  • packages/explorer/src/routes/+page.marko
  • packages/run/README.md
  • packages/run/src/__tests__/fixtures/node-adapter-express-import/src/index.ts
  • packages/run/src/adapter/dev-server.ts
  • packages/run/src/adapter/index.ts
  • packages/run/src/adapter/logger.ts
  • packages/run/src/adapter/utils.ts
  • packages/run/src/vite/__tests__/parse-flat-route.test.ts
  • packages/run/src/vite/__tests__/route-builder.test.ts
  • packages/run/src/vite/plugin.ts
  • packages/run/src/vite/routes/builder.ts
  • packages/run/src/vite/utils/server.ts

"routetypes",
"jsnext",
"vdir",
"Broutes"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for "Broutes" usage in the codebase to determine if it's intentional
rg -n -i 'broutes' --type=ts --type=js --type=marko

Repository: marko-js/run

Length of output: 85


🏁 Script executed:

#!/bin/bash
# Search for "Broutes" and similar terms without type restrictions
echo "=== Searching for 'Broutes' (case-insensitive) ==="
rg -i 'broutes' --max-count=20

echo ""
echo "=== Searching for 'BRoutes' pattern ==="
rg 'BRoutes' --max-count=20

echo ""
echo "=== Checking cspell.json file context ==="
cat -n cspell.json | head -50

Repository: marko-js/run

Length of output: 1491


🏁 Script executed:

#!/bin/bash
# Get context around the basePath comment in plugin.ts
echo "=== Context from plugin.ts around basePath line ==="
rg -B 5 -A 5 'basePath.*2Broutes' packages/run/src/vite/plugin.ts

echo ""
echo "=== Search for any actual code/variable using 'Broutes' (not comments) ==="
rg 'Broutes' --type-not=md --type-not=json -C 2

echo ""
echo "=== Search for 'routes' usage in the vite plugin ==="
rg -i '\.routes|broutes|\+routes' packages/run/src/vite/plugin.ts -A 2 -B 2

Repository: marko-js/run

Length of output: 2146


Remove "Broutes" from the whitelist—it appears to be a typo.

"Broutes" is not used anywhere in the active codebase. The only occurrence outside cspell.json is in a commented-out code snippet in packages/run/src/vite/plugin.ts that contains %2Broutes (URL-encoded +routes), which is not "Broutes". This entry should be removed as it serves no purpose.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cspell.json` at line 38, Remove the unused whitelist entry "Broutes" from
cspell.json because it's a typo and not referenced by active code; locate the
"Broutes" string in cspell.json and delete that array element so the
spellchecker no longer ignores this nonexistent token (no other code changes
required).

"change": "changeset add",
"format": "eslint --format unix --fix .; prettier . --write --with-node-modules --log-level=warn",
"lint": "eslint --format unix . && prettier . --check --with-node-modules --log-level=warn",
"lint": "eslint --format unix . && prettier . --check --with-node-modules --log-level=warn && cspell \"**/*.{md,ts,marko}\"",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Current lint scripts:"
jq '.scripts | {lint: .lint, "@ci:lint": .["@ci:lint"]}' package.json

echo
echo "Where lint entrypoints are referenced:"
rg -n --hidden -g '!node_modules' -g '!.git' -e '@ci:lint|npm run lint|lint-staged|pre-commit|husky'

Repository: marko-js/run

Length of output: 1194


🏁 Script executed:

# Check for lint-staged configuration
rg -n 'lint-staged' package.json -A 10
cat .lintstagedrc* 2>/dev/null || echo "No .lintstagedrc file found"

Repository: marko-js/run

Length of output: 616


Keep the CI lint path in sync with lint.

@ci:lint is missing cspell and is actively invoked by CI (.github/workflows/ci.yml). This means spelling errors can bypass CI checks even though npm run lint (with cspell) catches them locally. The scripts should run the same checks.

Suggested fix
-    "@ci:lint": "eslint --format unix . && prettier . --check --with-node-modules --log-level=warn",
+    "@ci:lint": "eslint --format unix . && prettier . --check --with-node-modules --log-level=warn && cspell \"**/*.{md,ts,marko}\"",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 19, The CI lint script (`@ci`:lint) is missing the cspell
check so CI can miss spelling issues; update the "@ci:lint" script to include
the same cspell invocation used by "lint" (e.g., add cspell "**/*.{md,ts,marko}"
with the same flags) so `@ci`:lint and lint run identical checks; locate the
package.json scripts object and modify the "@ci:lint" entry to mirror the "lint"
entry (including eslint, prettier checks, and the cspell command and options).

@LuLaValva LuLaValva merged commit aba9493 into main Mar 23, 2026
9 checks passed
@LuLaValva LuLaValva deleted the spell-check branch March 23, 2026 20:46
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

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

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #185   +/-   ##
===========================
===========================

☔ 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.

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