Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prettier sort #800

Merged
merged 4 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
40 changes: 30 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"ajv": "^8.10.0",
"command-line-args": "^5.2.1",
"lodash": "^4.17.21",
"prettier": "^2",
"prettier": "^3",
"sync-fetch": "^0.4.2"
},
"devDependencies": {
Expand All @@ -35,11 +35,18 @@
"husky": "^8",
"lint-staged": "^13.2.1",
"mocha": "^9.2.1",
"prettier": "^2",
"prettier": "^3",
"prettier-plugin-sort-json": "^3.1.0",
"ts-node": "^9.1.1",
"typescript": "^4.6.4"
},
"lint-staged": {
"{{**,.}/*.json,.*.json,*.json}": "prettier --write"
},
"prettier": {
"jsonRecursiveSort": true,
"plugins": [
"prettier-plugin-sort-json"
]
}
}
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"
}
Loading
Loading