Skip to content

Commit c35b60b

Browse files
Merge pull request #8972 from Shopify/gonzalo/theme-check-one-based-json
Use one-based positions in theme check JSON output
2 parents f611d5e + c8dafc4 commit c35b60b

5 files changed

Lines changed: 48 additions & 26 deletions

File tree

‎docs/cli/json-output.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Progress and diagnostics use JSON side events on stderr.
3232
| Shared meanings | Use `name`, `clientId`, `previousVersion`, and distinct `planHandle`/`planName`. Resource URL names and placement agree across commands. Different projections may expose different fields, but a shared field keeps its meaning. |
3333
| Numbers and enums | Bulk `objectCount` is a nonnegative decimal string; reject unsafe numeric inputs. Bounded counts and positions are nonnegative integers; money uses strings. CLI-owned enums are closed, with kebab-case multiword values. Upstream enums remain extensible strings with documented known values. |
3434
| Files | Use absolute native filesystem paths: `path` for the primary artifact, `directory` for a project directory, descriptive `...Path` fields for additional files. Relative route names stay route names. |
35-
| Diagnostics | Use `filePath` for filesystem paths and array-valued `fieldPath` for configuration fields. JSON line/column positions are zero-based; text presenters can convert them. |
35+
| Diagnostics | Use `filePath` for filesystem paths and array-valued `fieldPath` for configuration fields. JSON line/column positions are one-based, matching human-readable output. |
3636
| Pagination | Use `pageInfo` when results are capped, retain totals already fetched, and distinguish unknown values from `false` or zero. Do not invent a cursor. Document whether the list is complete or one page. |
3737
| Versioning | Version CLI result contracts with the CLI release. Independently versioned artifact formats keep their own versions; do not introduce a command-specific result version field. |
3838

‎packages/cli/README.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14151,23 +14151,23 @@ DESCRIPTION
1415114151
},
1415214152
"startRow": {
1415314153
"type": "integer",
14154-
"minimum": 0,
14155-
"description": "The zero-based starting line."
14154+
"exclusiveMinimum": 0,
14155+
"description": "The one-based starting line."
1415614156
},
1415714157
"startColumn": {
1415814158
"type": "integer",
14159-
"minimum": 0,
14160-
"description": "The zero-based starting column."
14159+
"exclusiveMinimum": 0,
14160+
"description": "The one-based starting column."
1416114161
},
1416214162
"endRow": {
1416314163
"type": "integer",
14164-
"minimum": 0,
14165-
"description": "The zero-based ending line."
14164+
"exclusiveMinimum": 0,
14165+
"description": "The one-based ending line."
1416614166
},
1416714167
"endColumn": {
1416814168
"type": "integer",
14169-
"minimum": 0,
14170-
"description": "The zero-based ending column."
14169+
"exclusiveMinimum": 0,
14170+
"description": "The one-based ending column."
1417114171
},
1417214172
"message": {
1417314173
"type": "string"

0 commit comments

Comments
 (0)