Skip to content

Commit 33e71ac

Browse files
authored
chore: improve documentation and tooling configuration (#23)
1 parent 6896da4 commit 33e71ac

File tree

8 files changed

+19
-8
lines changed

8 files changed

+19
-8
lines changed

.github/renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["config:best-practices"],
3+
"extends": ["config:best-practices", "customManagers:biomeVersions"],
44
"timezone": "Asia/Tokyo",
55
"schedule": ["before 5am on Monday"],
66
"labels": ["dependencies"],

AGENTS.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ For implementation-level security constraints, see the **Security rules (mandato
103103

104104
---
105105

106+
## Key validation criteria
107+
108+
To maintain a predictable boundary, keys must meet the following criteria. Failure to do so results in an `invalid_key` issue.
109+
110+
- **Non-empty**: A key must have a length > 0.
111+
- Note: Keys consisting only of whitespace characters are considered valid as they satisfy the length requirement and preserve the "opaque strings" principle.
112+
- **Valid Type**: A key must be a string (FormData specifications generally ensure this, but the parser must enforce it).
113+
- **No reserved names**: While "opaque", keys that interfere with basic object access or are inherently ambiguous in a flat structure are rejected.
114+
115+
---
116+
106117
## ParseIssue contract
107118

108119
### Allowed IssueCode values (fixed)

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
"lint": "oxlint . --deny-warnings",
3838
"lint:fix": "oxlint . --fix-suggestions",
3939
"check:type": "tsc --noEmit",
40-
"format:biome": "biome format --write",
40+
"format:biome": "biome check --write --assist-enabled true",
4141
"format:prettier": "prettier --cache --write \"**/*.{md,yml,yaml}\"",
4242
"format": "npm-run-all2 format:biome format:prettier",
4343
"fix": "npm-run-all2 lint:fix format",
44-
"check:biome": "biome format .",
44+
"check:biome": "biome check . --assist-enabled true",
4545
"check:prettier": "prettier --cache --check \"**/*.{md,yml,yaml}\"",
4646
"check:format": "npm-run-all2 check:biome check:prettier",
4747
"check:source": "npm-run-all2 lint check:format",

src/issues/createIssue.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { describe, it, expect } from "vitest";
1+
import { describe, expect, it } from "vitest";
22
import { createIssue } from "#issues/createIssue";
33
import type { ParseIssue } from "#types/ParseIssue";
44

src/issues/createIssue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { ParseIssue } from "#types/ParseIssue";
21
import type { IssueCode } from "#types/IssueCode";
2+
import type { ParseIssue } from "#types/ParseIssue";
33

44
/**
55
* Payload for creating a ParseIssue.

src/issues/forbiddenKeys.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { describe, it, expect } from "vitest";
1+
import { describe, expect, it } from "vitest";
22
import { FORBIDDEN_KEYS } from "#issues/forbiddenKeys";
33

44
describe("FORBIDDEN_KEYS", () => {

src/parse.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assert, describe, it, expect } from "vitest";
1+
import { assert, describe, expect, it } from "vitest";
22
import { parse } from "#parse";
33

44
describe("valid input", () => {

src/parse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { FORBIDDEN_KEYS } from "#issues/forbiddenKeys";
21
import { createIssue } from "#issues/createIssue";
2+
import { FORBIDDEN_KEYS } from "#issues/forbiddenKeys";
33
import type { ParseResult } from "#types/ParseResult";
44

55
/**

0 commit comments

Comments
 (0)