mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
Fix the sorting of the schema submited to schemastore (#10173)
This commit is contained in:
parent
40186a26ef
commit
cea59b4425
1 changed files with 11 additions and 2 deletions
|
@ -55,9 +55,18 @@ def update_schemastore(schemastore: Path) -> None:
|
|||
schema = json.loads(root.joinpath("ruff.schema.json").read_text())
|
||||
schema["$id"] = "https://json.schemastore.org/ruff.json"
|
||||
src.joinpath(ruff_json).write_text(
|
||||
json.dumps(dict(sorted(schema.items())), indent=2, ensure_ascii=False),
|
||||
json.dumps(dict(schema.items()), indent=2, ensure_ascii=False),
|
||||
)
|
||||
check_call(
|
||||
[
|
||||
"node_modules/.bin/prettier",
|
||||
"--plugin",
|
||||
"prettier-plugin-sort-json",
|
||||
"--write",
|
||||
ruff_json,
|
||||
],
|
||||
cwd=src,
|
||||
)
|
||||
check_call(["node_modules/.bin/prettier", "--write", ruff_json], cwd=src)
|
||||
|
||||
# Check if the schema has changed
|
||||
# https://stackoverflow.com/a/9393642/3549270
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue