Skip to content

chore: spelling and linting #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

BobbieGoede
Copy link
Member

@BobbieGoede BobbieGoede commented May 20, 2025

Description

These utilities are great! For some reason I thought most of the utilities were in intlify/h3 🤦..

This PR contains spelling/typo fixes and resolves linting errors (automatically with deno lint --fix and deno fmt)

Linked Issues

Additional context

Summary by CodeRabbit

Summary by CodeRabbit

  • Documentation

    • Corrected typographical errors in documentation, comments, and log messages across the project for improved clarity and accuracy.
    • Updated test names and comments for better readability.
  • Style

    • Fixed minor spelling mistakes in test descriptions and console log outputs.
  • Chores

    • Added explicit imports of the process module in scripts, tests, and playground files to support process-related operations and event handling.

Copy link

coderabbitai bot commented May 20, 2025

Walkthrough

This update corrects typographical errors in documentation comments, test names, log messages, and import statements across multiple files. It also adds explicit imports of the Node.js process module where needed. No changes were made to code logic, control flow, or exported entities. The modifications are limited to spelling, grammar, and import improvements.

Changes

File(s) Change Summary
README.md, deno/README.md Fixed typos: "utilies" → "utilities", "accpet" → "accept" in documentation text.
deno/locale.ts, src/locale.ts Fixed typo in comment: "paser" → "parse" in Unicode script subtag documentation.
deno/shared.ts, src/shared.ts Fixed typos in JSDoc: "nomralize" → "normalize", "conosle" → "console", and "getPathLanugage" → "getPathLanguage" in function documentation.
deno/web.ts, src/h3.ts, src/hono.ts, src/web.ts Fixed typo in JSDoc: "retuns" → "returns" in getHeaderLanguage function documentation.
src/node.ts, src/node.test.ts Changed imports to type-only for IncomingMessage and OutgoingMessage; fixed typos "retuns" → "returns", "enmpty" → "empty" in JSDoc; added explicit import of process from 'node:process'.
scripts/deno.ts, scripts/bump-deno.ts, scripts/bump-edge.ts, scripts/playwright-version.ts, scripts/replaceDeps.ts Added explicit import of process from 'node:process'; fixed typo in log message in scripts/deno.ts ("directries" → "directories").
playground/browser/browser.test.mjs, playground/node/index.ts, playground/node/node.test.mjs Added explicit import of process from 'node:process' to support process usage in tests and server code.
src/locale.test-d.ts Fixed test name: "ParseUnicodeLangugageId" → "ParseUnicodeLanguageId"; comment typo fixed.
playground/browser/index.html Capitalized doctype declaration: <!doctype html><!DOCTYPE html>.

Poem

A bunny hopped through docs and code,
Fixing typos on its road.
"Returns" and "accept" now clear,
No more errors lurking here!
Imports neat and logs aligned,
The codebase now is well-defined.
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between a1d2bc2 and e0520f0.

📒 Files selected for processing (2)
  • deno/shared.ts (2 hunks)
  • src/shared.ts (2 hunks)
✅ Files skipped from review due to trivial changes (2)
  • src/shared.ts
  • deno/shared.ts
✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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: 0

🧹 Nitpick comments (1)
deno/locale.ts (1)

260-263: Typo fix in JSDoc comment
The correction from “paser” to “parser” fixes the spelling in the Unicode script subtag description. For consistency with src/locale.ts, you may consider using the verb form “parse” instead of the noun “parser.”

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between babecfe and 17ea58e.

📒 Files selected for processing (13)
  • README.md (1 hunks)
  • deno/README.md (1 hunks)
  • deno/locale.ts (1 hunks)
  • deno/shared.ts (1 hunks)
  • deno/web.ts (1 hunks)
  • scripts/deno.ts (1 hunks)
  • src/h3.ts (1 hunks)
  • src/hono.ts (1 hunks)
  • src/locale.test-d.ts (2 hunks)
  • src/locale.ts (1 hunks)
  • src/node.ts (2 hunks)
  • src/shared.ts (1 hunks)
  • src/web.ts (1 hunks)
🧰 Additional context used
🪛 LanguageTool
deno/README.md

[grammar] ~156-~156: Nouns are not usually modified by plural nouns. Is it possible that you meant to use the singular or possessive form here?
Context: ...thLocale-tryQueryLocale` The about utilities functions accept Web APIs such as [Requ...

(PLURAL_MODIFIER)


[grammar] ~160-~160: The first clause in a conditional statement is not usually in the future tense. Consider removing the modal verb “will”.
Context: ... #### Specialized environments If you will use Node.js and H3, You can do `import { .....

(CONDITIONAL_CLAUSE)


[uncategorized] ~164-~164: Loose punctuation mark.
Context: ...ENV}is one of the following: -node: accept IncomingMessageandOutgoing`...

(UNLIKELY_OPENING_PUNCTUATION)

README.md

[grammar] ~156-~156: Nouns are not usually modified by plural nouns. Is it possible that you meant to use the singular or possessive form here?
Context: ...thLocale-tryQueryLocale` The about utilities functions accept Web APIs such as [Requ...

(PLURAL_MODIFIER)


[grammar] ~160-~160: The first clause in a conditional statement is not usually in the future tense. Consider removing the modal verb “will”.
Context: ... #### Specialized environments If you will use Node.js and H3, You can do `import { .....

(CONDITIONAL_CLAUSE)


[uncategorized] ~164-~164: Loose punctuation mark.
Context: ...ENV}is one of the following: -node: accept IncomingMessageandOutgoing`...

(UNLIKELY_OPENING_PUNCTUATION)

🔇 Additional comments (16)
src/hono.ts (1)

58-58: Approve documentation typo fix.

Corrected “retuns” to “returns” in the JSDoc for getHeaderLanguage. No functional code changes.

src/web.ts (1)

57-57: Approve documentation typo fix.

Corrected “retuns” to “returns” in the JSDoc for getHeaderLanguage. No functional code changes.

src/h3.ts (1)

57-57: Approve documentation typo fix.

Corrected “retuns” to “returns” in the JSDoc for getHeaderLanguage. No functional code changes.

deno/web.ts (1)

57-57: Approve documentation typo fix.

Corrected “retuns” to “returns” in the JSDoc for getHeaderLanguage. No functional code changes.

deno/shared.ts (1)

134-134: Approve documentation typo fix.

Corrected “getPathLanugage” to “getPathLanguage” in the JSDoc for registerPathLanguageParser. No functional code changes.

src/shared.ts (1)

134-134: Typo fix in JSDoc parameter description
Corrected the function name in the comment from "getPathLanugage" to "getPathLanguage".

scripts/deno.ts (1)

29-29: Typo fix in console log
Corrected "directries" to "directories" in the log message.

deno/README.md (2)

156-156: Typo fix in documentation
Corrected "utilies" to "utilities" in the description of supported Web API functions.

🧰 Tools
🪛 LanguageTool

[grammar] ~156-~156: Nouns are not usually modified by plural nouns. Is it possible that you meant to use the singular or possessive form here?
Context: ...thLocale-tryQueryLocale` The about utilities functions accept Web APIs such as [Requ...

(PLURAL_MODIFIER)


164-164: Typo fix in list item
Corrected "accpet" to "accept" in the node environment description.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~164-~164: Loose punctuation mark.
Context: ...ENV}is one of the following: -node: accept IncomingMessageandOutgoing`...

(UNLIKELY_OPENING_PUNCTUATION)

README.md (2)

156-156: Typo fix in documentation
Corrected "utilies" to "utilities" in the description of supported Web API functions.

🧰 Tools
🪛 LanguageTool

[grammar] ~156-~156: Nouns are not usually modified by plural nouns. Is it possible that you meant to use the singular or possessive form here?
Context: ...thLocale-tryQueryLocale` The about utilities functions accept Web APIs such as [Requ...

(PLURAL_MODIFIER)


164-164: Typo fix in list item
Corrected "accpet" to "accept" in the node environment description.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~164-~164: Loose punctuation mark.
Context: ...ENV}is one of the following: -node: accept IncomingMessageandOutgoing`...

(UNLIKELY_OPENING_PUNCTUATION)

src/node.ts (2)

58-58: Typo fix in JSDoc description
Corrected "retuns" to "returns" in the getHeaderLanguage JSDoc comment.


580-580: Typo fix in JSDoc return description
Corrected "enmpty" to "empty" in the getNavigatorLanguage JSDoc comment.

src/locale.ts (1)

260-263: Typo fix in JSDoc comment
The correction from “paser” to “parse” accurately fixes the spelling in the Unicode script subtag description. No functional impact.

src/locale.test-d.ts (2)

289-289: Fix test name spelling
Updated the test suite name from ParseUnicodeLangugageId to ParseUnicodeLanguageId. This aligns the test name with the actual type.


315-315: Fix comment spelling
Corrected “Erros” to “Errors” in the comment header for the error cases.

@BobbieGoede BobbieGoede changed the title chore: spelling chore: spelling and linting May 20, 2025
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