// SPDX-FileCopyrightText: 2026 Kerstin Humm // // SPDX-License-Identifier: AGPL-3.0-or-later import { AnnotatedJson, Rule } from "../types.js"; const legalToplevelNames: string[] = ["timezone"]; export default { name: "remaining attributes", validate: (self) => { const result: AnnotatedJson = { annotations: [], object: {} }; for (const name in self) { if (!legalToplevelNames.includes(name)) { result.object[name] = { kind: "Note", id: "UnknownToplevelName", text: `${name} is not defined in the standard and is therefore not checked`, }; } } return result; }, tests: [{ value: { "someattribute": "somevalue" }, result: { annotations: [], object: { "someattribute": "UnknownToplevelName" }, }, }], } satisfies Rule;