Skip to content

docs: fix copyable JSON and TypeScript config examples - #401

Merged
ai merged 1 commit into
ai:mainfrom
Likio3000:docs/fix-json-typescript-config-examples-20260923
Sep 23, 2026
Merged

ai merged 1 commit into
ai:mainfrom
Likio3000:docs/fix-json-typescript-config-examples-20260923

Conversation

@Likio3000

Copy link
Copy Markdown
Contributor

The Limits Config section shows JavaScript syntax under the .size-limit.json filename, so copying that block produces invalid JSON. Its TypeScript example also imports SizeLimitConfig from a repository-relative fixture path that is unavailable in an installed project.

Use JSON syntax and a json fence for the JSON example, and import the type from size-limit. The example values and module export style stay the same.

Validation: the original JSON example fails JSON parsing; the corrected block parses to the expected configuration array. Statically checked the config search paths, existing config fixtures/tests, and the package's exported SizeLimitConfig declaration. No Size Limit loader, bundle analysis, test suite, or TypeScript compiler was run.

AI disclosure: prepared with OpenAI Codex on behalf of Likio3000, with independent review before submission.

@ai
ai merged commit b2b9568 into ai:main Sep 23, 2026
@ai

ai commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Thanks!

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.

2 participants