From 22cf2fc1ad00112955f7a63a6a513fe0f3c610d6 Mon Sep 17 00:00:00 2001 From: Pete Gonzalez <4673363+octogonz@users.noreply.github.com> Date: Mon, 24 Jun 2024 22:16:39 -0700 Subject: [PATCH] Add lockfile-lint.schema.json --- lockfile-explorer/lockfile-lint.schema.json | 45 +++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 lockfile-explorer/lockfile-lint.schema.json diff --git a/lockfile-explorer/lockfile-lint.schema.json b/lockfile-explorer/lockfile-lint.schema.json new file mode 100644 index 0000000..0e383a9 --- /dev/null +++ b/lockfile-explorer/lockfile-lint.schema.json @@ -0,0 +1,45 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Lockfile Lint Configuration", + "description": "The lockfile-explorer.json configuration file for lockfile-lint tool.", + "type": "object", + "additionalProperties": false, + "properties": { + "$schema": { + "description": "Part of the JSON Schema standard, this optional keyword declares the URL of the schema that the file conforms to. Editors may download the schema and use it to perform syntax highlighting.", + "type": "string" + }, + "rules": { + "description": "The rules adopted by Monorepo and the lockfile-lint will help to check.", + "type": "array", + "items": { + "type": "object", + "oneOf": [ + { + "type": "object", + "required": ["rule", "project", "requiredVersions"], + "properties": { + "rule": { + "description": "Rule name applied to the project.", + "const": "restrict-versions" + }, + "project": { + "description": "Project name.", + "type": "string" + }, + "requiredVersions": { + "description": "List of restrict dependency version.", + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + ] + } + } + } +}