docs: add TOML parser options to README#418
Conversation
🦋 Changeset detectedLatest commit: a403d17 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 |
WalkthroughThe TOML package documentation has been updated by adding a new section titled "Parser Options" in the README file. This section introduces the Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/toml/README.md (2)
50-51: Typo in Section Header: The header "## Parsre Options" appears to have a typographical error. It should be "## Parse Options" for clarity and consistency with the rest of the documentation.Proposed Change:
-## Parsre Options +## Parse Options
75-75: Type Annotation Correction: The propertyallowedBlankLinesis declared with the typeint, which is non-standard in TypeScript. Typically, numeric values are annotated with the typenumber.Proposed Change:
- allowedBlankLines: int // default `1` + allowedBlankLines: number // default `1`
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/toml/README.md(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (1)
packages/toml/README.md (1)
50-77: Overall Documentation Enhancement: The addition of theprettierOptionsinterface effectively details the available configuration options for the TOML parser. This section significantly improves the readability and usability of the documentation.
Fixed the spelling mistake. With regards to |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/toml/README.md (1)
50-79: Enhance Type Annotations & Naming ConsistencyThe new "Parse Options" section with the
prettierOptionsinterface is well documented and clearly communicates the available TOML parser options. I have a couple of suggestions for improvement:
Type Correction: In TypeScript, numeric types should be declared as
numberrather thanint. Consider updating:- allowedBlankLines: int // default `1` + allowedBlankLines: number // default `1`Naming Convention: To align with common TypeScript practices, it’s conventional to name interfaces with PascalCase. You may want to rename
prettierOptionstoPrettierOptions:-interface prettierOptions { +interface PrettierOptions {These changes will ensure consistency with TypeScript standards and improve the clarity of the documentation.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/toml/README.md(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Codacy Static Code Analysis
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/toml/README.md (1)
78-78: Type Annotation Update forallowedBlankLines
To align with standard TypeScript conventions, please update the type ofallowedBlankLinesfrominttonumber.Apply the following diff:
- allowedBlankLines: int // default `1` + allowedBlankLines: number // default `1`
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/toml/README.md(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (2)
packages/toml/README.md (2)
50-50: Header Correctness Check
The header "## Parse Options" is now correctly spelled and conforms with the repository’s documentation style.
52-80: Useful Addition of Configuration Documentation
The introduction of thePrettierOptionsinterface clearly documents the available TOML formatting options, which should improve discoverability for users.
2e3cce2 to
f001fbb
Compare
TOML parser options to README
|
@esacteksab Thanks for catching up! |
I was curious what options were available and couldn't easily finding it without digging into the source. I went looking at other plugins and there doesn't seem to be a consistent pattern, with some writing
jsonand others choosing a<table></table>. I looked at the other packages in the repo, and you use a code fence. I followed that convention.Hope you don't mind the PR, hopefully it will be easier for others to know what options are supported.
Thanks!
Summary by CodeRabbit
PrettierOptionsinterface and its properties for customizing formatting behavior with sensible defaults.