Skip to content

Commit 1b897d1

Browse files
authored
set up prettier for auto-formatting (#184)
1 parent 121ce6a commit 1b897d1

451 files changed

Lines changed: 8384 additions & 6405 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/add-command-spec/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Match the formatting conventions used in the command's `--help` output. For exam
1818

1919
Run `cargo test` to verify the spec deserializes correctly and any referenced `generatorName`s exist.
2020

21+
Format the JSON spec with `npm run format -- command-signatures/json/<command>.json`.
22+
2123
## Reference Examples
2224

2325
- **Simple spec with generator**: `json/kill.json` + `src/generators/kill.rs` — minimal example showing `generatorName` usage for process and signal completions

.github/workflows/CI.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@ env:
88
CARGO_TERM_COLOR: always
99

1010
jobs:
11+
format:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '20'
19+
cache: 'npm'
20+
- name: Install dependencies
21+
run: npm ci
22+
- name: Check JSON formatting
23+
run: npm run format:check
1124
lint:
1225
runs-on: ubuntu-latest
1326
steps:

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
command-signatures/json/autogenerated/

.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"tabWidth": 4,
3+
"plugins": ["prettier-plugin-multiline-arrays"],
4+
"multilineArraysWrapThreshold": 1
5+
}

command-signatures/json/act.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,4 +387,4 @@
387387
"isPersistent": true
388388
}
389389
]
390-
}
390+
}

command-signatures/json/adb.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,4 +954,4 @@
954954
}
955955
}
956956
]
957-
}
957+
}

command-signatures/json/afplay.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@
6868
"description": "Debug print output"
6969
}
7070
]
71-
}
71+
}

command-signatures/json/aftman.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@
7070
"description": "Show aftman's version"
7171
}
7272
]
73-
}
73+
}

command-signatures/json/ag.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,4 +516,4 @@
516516
"description": "Separate the filenames with \u0000, rather than \n: this allows xargs -0 <command> to correctly process filenames containing spaces or newlines"
517517
}
518518
]
519-
}
519+
}

command-signatures/json/agrippa.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,4 @@
203203
"args": {
204204
"name": "component's name"
205205
}
206-
}
206+
}

0 commit comments

Comments
 (0)