diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..108a8a6 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,11 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.json] +indent_size = 2 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 7fe91f8..5794a88 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -35,7 +35,7 @@ jobs: chmod u+x /usr/local/bin/taplo - name: Validate party series TOML file - run: taplo lint data/series.toml && taplo format --check data/series.toml + run: taplo lint --schema "file://"$PWD"/schemas/series.json" data/series.toml && taplo format --check data/series.toml - name: Validate party TOML files run: | diff --git a/schemas/series.json b/schemas/series.json new file mode 100644 index 0000000..7faa567 --- /dev/null +++ b/schemas/series.json @@ -0,0 +1,29 @@ +{ + "title": "LAN party series", + "type": "object", + "properties": { + "series": { + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternative_names": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + } + }, + "required": ["slug", "name"] + } + } + } +}