Skip to content

Commit

Permalink
Reformat files with prettier-plugin-sort-json.
Browse files Browse the repository at this point in the history
  • Loading branch information
plural committed Jan 15, 2024
1 parent 3b19fdd commit 028e087
Show file tree
Hide file tree
Showing 704 changed files with 2,846 additions and 2,846 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"warnOnUnsupportedTypeScriptVersion": false
},
"plugins": ["@typescript-eslint"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"rules": {
"@typescript-eslint/no-explicit-any": "off"
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"format": "prettier --no-color --write '{{**,.}/*.json,.*.json,*.json}'",
"format-check": "prettier --no-color --check '{{**,.}/*.json,.*.json,*.json}'",
"format": "prettier --plugin=prettier-plugin-sort-json --no-color --json-recursive-sort --write '{{**,.}/*.json,.*.json,*.json}'",
"format-check": "prettier --plugin=prettier-plugin-sort-json --no-color --json-recursive-sort --check '{{**,.}/*.json,.*.json,*.json}'",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"prepare": "husky install",
"test": "mocha -R list -r ts-node/register test/*.ts test/**/*.ts",
Expand Down
36 changes: 18 additions & 18 deletions schema/v1/card_schema.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
{
"$id": "https://github.com/netrunnerdb/netrunner-cards-json/blob/master/schema/v1/card_schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"allOf": [
{
"title": "Faction codes must be valid for the side.",
"type": "object",
"oneOf": [
{
"properties": {
"side_code": {
"const": "corp"
},
"faction_code": {
"enum": [
"haas-bioroid",
Expand All @@ -23,14 +16,14 @@
"neutral-corp",
"weyland-consortium"
]
},
"side_code": {
"const": "corp"
}
}
},
{
"properties": {
"side_code": {
"const": "runner"
},
"faction_code": {
"enum": [
"adam",
Expand All @@ -41,14 +34,17 @@
"shaper",
"sunny-lebeau"
]
},
"side_code": {
"const": "runner"
}
}
}
]
],
"title": "Faction codes must be valid for the side.",
"type": "object"
},
{
"title": "Type codes must be valid for the side.",
"type": "object",
"oneOf": [
{
"properties": {
Expand Down Expand Up @@ -77,7 +73,9 @@
}
}
}
]
],
"title": "Type codes must be valid for the side.",
"type": "object"
}
],
"oneOf": [
Expand Down Expand Up @@ -291,9 +289,9 @@
"type": "integer"
},
"side_code": {
"enum": ["corp", "runner"],
"minLength": 1,
"type": "string",
"enum": ["corp", "runner"]
"type": "string"
},
"strength": {
"oneOf": [
Expand Down Expand Up @@ -344,6 +342,8 @@
"title",
"type_code",
"uniqueness"
]
}
],
"type": "object"
},
"type": "array"
}
8 changes: 4 additions & 4 deletions schema/v1/cycle_schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"$id": "https://github.com/netrunnerdb/netrunner-cards-json/blob/master/schema/v1/cycle_schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
Expand All @@ -26,6 +24,8 @@
"type": "integer"
}
},
"required": ["code", "name", "position", "size", "rotated"]
}
"required": ["code", "name", "position", "size", "rotated"],
"type": "object"
},
"type": "array"
}
26 changes: 13 additions & 13 deletions schema/v1/faction_schema.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
{
"$id": "https://github.com/netrunnerdb/netrunner-cards-json/blob/master/schema/v1/faction_schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"allOf": [
{
"title": "Faction codes must be valid for the side.",
"type": "object",
"oneOf": [
{
"properties": {
"side_code": {
"const": "corp"
},
"faction_code": {
"enum": [
"haas-bioroid",
Expand All @@ -23,14 +16,14 @@
"neutral-corp",
"weyland-consortium"
]
},
"side_code": {
"const": "corp"
}
}
},
{
"properties": {
"side_code": {
"const": "runner"
},
"faction_code": {
"enum": [
"adam",
Expand All @@ -41,10 +34,15 @@
"shaper",
"sunny-lebeau"
]
},
"side_code": {
"const": "runner"
}
}
}
]
],
"title": "Faction codes must be valid for the side.",
"type": "object"
}
],
"properties": {
Expand Down Expand Up @@ -75,6 +73,8 @@
"type": "string"
}
},
"required": ["code", "name"]
}
"required": ["code", "name"],
"type": "object"
},
"type": "array"
}
8 changes: 4 additions & 4 deletions schema/v1/pack_schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"$id": "https://github.com/netrunnerdb/netrunner-cards-json/blob/master/schema/v1/pack_schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
Expand Down Expand Up @@ -61,6 +59,8 @@
"position",
"date_release",
"size"
]
}
],
"type": "object"
},
"type": "array"
}
8 changes: 4 additions & 4 deletions schema/v1/rotations_schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"$id": "https://github.com/netrunnerdb/netrunner-cards-json/blob/master/schema/v1/rotations_schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
Expand Down Expand Up @@ -31,6 +29,8 @@
"type": "array"
}
},
"required": ["code", "date_start", "name", "rotated"]
}
"required": ["code", "date_start", "name", "rotated"],
"type": "object"
},
"type": "array"
}
8 changes: 4 additions & 4 deletions schema/v1/side_schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"$id": "https://github.com/netrunnerdb/netrunner-cards-json/blob/master/schema/v1/side_schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
Expand All @@ -15,6 +13,8 @@
"type": "string"
}
},
"required": ["code", "name"]
}
"required": ["code", "name"],
"type": "object"
},
"type": "array"
}
8 changes: 4 additions & 4 deletions schema/v1/type_schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"$id": "https://github.com/netrunnerdb/netrunner-cards-json/blob/master/schema/v1/type_schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
Expand Down Expand Up @@ -32,6 +30,8 @@
]
}
},
"required": ["code", "name", "side_code"]
}
"required": ["code", "name", "side_code"],
"type": "object"
},
"type": "array"
}
18 changes: 9 additions & 9 deletions schema/v2/card_cycles_schema.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"$id": "https://github.com/netrunnerdb/netrunner-cards-json/blob/master/schema/v2/card_cycles_schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"id": {
"minLength": 1,
"type": "string"
Expand All @@ -18,15 +19,14 @@
"minLength": 1,
"type": "string"
},
"description": {
"type": "string"
},
"released_by": {
"enum": ["fantasy_flight_games", "null_signal_games"],
"minLength": 1,
"type": "string",
"enum": ["fantasy_flight_games", "null_signal_games"]
"type": "string"
}
},
"required": ["id", "legacy_code", "name", "released_by"]
}
"required": ["id", "legacy_code", "name", "released_by"],
"type": "object"
},
"type": "array"
}
12 changes: 6 additions & 6 deletions schema/v2/card_layouts_schema.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
{
"$id": "https://github.com/netrunnerdb/netrunner-cards-json/blob/master/schema/v1/card_layouts_schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": {
"minLength": 1,
"type": "string"
},
"description": {
"id": {
"minLength": 1,
"type": "string"
},
Expand All @@ -19,6 +17,8 @@
"type": "string"
}
},
"required": ["id", "description", "name"]
}
"required": ["id", "description", "name"],
"type": "object"
},
"type": "array"
}
Loading

0 comments on commit 028e087

Please sign in to comment.