Skip to content

Commit 7a63cbb

Browse files
rhuanbarretoclaude
andcommitted
feat(fmt): enable import sorting, script sorting, and object collapsing
Enables sortImports, sortPackageJson.sortScripts, and objectWrap: "collapse" in oxfmt config. Consolidates a test assertion to stay within the max-lines lint limit after import sorting added a group separator line. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 74df66d commit 7a63cbb

89 files changed

Lines changed: 242 additions & 312 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.

.archgate/adrs/ARCH-005-testing-standards.rules.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { defineRules } from "../../src/formats/rules";
21
import { basename, dirname } from "node:path";
32

3+
import { defineRules } from "../../src/formats/rules";
4+
45
export default defineRules({
56
"test-mirrors-src": {
67
description: "Test directory structure should mirror src/ structure",

.archgate/lint/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ Place linter plugin files here, named by tool:
1616
2. Reference it in your oxlint config:
1717

1818
```json
19-
{
20-
"plugins": [".archgate/lint/oxlint.js"]
21-
}
19+
{ "plugins": [".archgate/lint/oxlint.js"] }
2220
```
2321

2422
## Why here?

.commitlintrc.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{
2-
"extends": ["@commitlint/config-conventional"]
3-
}
1+
{ "extends": ["@commitlint/config-conventional"] }

.oxfmtrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"trailingComma": "es5",
33
"printWidth": 80,
4-
"sortPackageJson": true,
4+
"objectWrap": "collapse",
5+
"sortImports": {},
6+
"sortPackageJson": { "sortScripts": true },
57
"ignorePatterns": [
68
"node_modules/",
79
"dist",

.simple-release.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { readFileSync, writeFileSync } from "node:fs";
2+
23
import { NpmProject } from "@simple-release/npm";
34

45
class ArchgateProject extends NpmProject {

.vscode/mcp.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
{
2-
"servers": {
3-
"archgate": {
4-
"command": "archgate",
5-
"args": ["mcp"]
6-
}
7-
}
8-
}
1+
{ "servers": { "archgate": { "command": "archgate", "args": ["mcp"] } } }

.vscode/settings.json

Lines changed: 13 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,19 @@
99
"editor.formatOnSave": true,
1010
"typescript.enablePromptUseWorkspaceTsdk": true,
1111
"terminal.integrated.scrollback": 100000,
12-
"[less]": {
13-
"editor.defaultFormatter": "oxc.oxc-vscode"
14-
},
15-
"[mdx]": {
16-
"editor.defaultFormatter": "oxc.oxc-vscode"
17-
},
18-
"[markdown]": {
19-
"editor.defaultFormatter": "oxc.oxc-vscode"
20-
},
21-
"[html]": {
22-
"editor.defaultFormatter": "oxc.oxc-vscode"
23-
},
24-
"[javascriptreact]": {
25-
"editor.defaultFormatter": "oxc.oxc-vscode"
26-
},
27-
"[javascript]": {
28-
"editor.defaultFormatter": "oxc.oxc-vscode"
29-
},
30-
"[yaml]": {
31-
"editor.defaultFormatter": "redhat.vscode-yaml"
32-
},
33-
"[json]": {
34-
"editor.defaultFormatter": "oxc.oxc-vscode"
35-
},
36-
"[typescriptreact]": {
37-
"editor.defaultFormatter": "oxc.oxc-vscode"
38-
},
39-
"[jsonc]": {
40-
"editor.defaultFormatter": "oxc.oxc-vscode"
41-
},
42-
"[typescript]": {
43-
"editor.defaultFormatter": "oxc.oxc-vscode"
44-
},
45-
"[xml]": {
46-
"editor.defaultFormatter": "oxc.oxc-vscode"
47-
},
48-
"[css]": {
49-
"editor.defaultFormatter": "oxc.oxc-vscode"
50-
},
12+
"[less]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
13+
"[mdx]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
14+
"[markdown]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
15+
"[html]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
16+
"[javascriptreact]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
17+
"[javascript]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
18+
"[yaml]": { "editor.defaultFormatter": "redhat.vscode-yaml" },
19+
"[json]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
20+
"[typescriptreact]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
21+
"[jsonc]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
22+
"[typescript]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
23+
"[xml]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
24+
"[css]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
5125
"redhat.telemetry.enabled": false,
5226
"typescript.tsdk": "node_modules/typescript/lib",
5327
"typescript.tsserver.maxTsServerMemory": 16384,

docs/astro.config.mjs

Lines changed: 16 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { defineConfig } from "astro/config";
21
import starlight from "@astrojs/starlight";
2+
import { defineConfig } from "astro/config";
33

44
export default defineConfig({
55
site: "https://cli.archgate.dev",
@@ -79,22 +79,14 @@ export default defineConfig({
7979
href: "https://github.com/archgate/cli",
8080
},
8181
],
82-
components: {
83-
Head: "./src/components/HeadSEO.astro",
84-
},
85-
editLink: {
86-
baseUrl: "https://github.com/archgate/cli/edit/main/docs/",
87-
},
82+
components: { Head: "./src/components/HeadSEO.astro" },
83+
editLink: { baseUrl: "https://github.com/archgate/cli/edit/main/docs/" },
8884
favicon: "/favicon.svg",
8985
head: [
9086
// ── Favicon ───────────────────────────────────────────────
9187
{
9288
tag: "link",
93-
attrs: {
94-
rel: "icon",
95-
type: "image/svg+xml",
96-
href: "/favicon.svg",
97-
},
89+
attrs: { rel: "icon", type: "image/svg+xml", href: "/favicon.svg" },
9890
},
9991
// ── Analytics ─────────────────────────────────────────────
10092
{
@@ -106,18 +98,12 @@ export default defineConfig({
10698
},
10799
},
108100
// ── Open Graph ────────────────────────────────────────────
109-
{
110-
tag: "meta",
111-
attrs: { property: "og:type", content: "website" },
112-
},
101+
{ tag: "meta", attrs: { property: "og:type", content: "website" } },
113102
{
114103
tag: "meta",
115104
attrs: { property: "og:site_name", content: "Archgate" },
116105
},
117-
{
118-
tag: "meta",
119-
attrs: { property: "og:locale", content: "en_US" },
120-
},
106+
{ tag: "meta", attrs: { property: "og:locale", content: "en_US" } },
121107
{
122108
tag: "meta",
123109
attrs: { property: "og:locale:alternate", content: "pt_BR" },
@@ -129,14 +115,8 @@ export default defineConfig({
129115
content: "https://cli.archgate.dev/og-image.png",
130116
},
131117
},
132-
{
133-
tag: "meta",
134-
attrs: { property: "og:image:width", content: "1200" },
135-
},
136-
{
137-
tag: "meta",
138-
attrs: { property: "og:image:height", content: "630" },
139-
},
118+
{ tag: "meta", attrs: { property: "og:image:width", content: "1200" } },
119+
{ tag: "meta", attrs: { property: "og:image:height", content: "630" } },
140120
{
141121
tag: "meta",
142122
attrs: {
@@ -158,14 +138,8 @@ export default defineConfig({
158138
},
159139
},
160140
// ── Additional meta ───────────────────────────────────────
161-
{
162-
tag: "meta",
163-
attrs: { name: "author", content: "Archgate" },
164-
},
165-
{
166-
tag: "meta",
167-
attrs: { name: "theme-color", content: "#6366f1" },
168-
},
141+
{ tag: "meta", attrs: { name: "author", content: "Archgate" } },
142+
{ tag: "meta", attrs: { name: "theme-color", content: "#6366f1" } },
169143
{
170144
tag: "meta",
171145
attrs: {
@@ -225,10 +199,7 @@ export default defineConfig({
225199
{
226200
label: "Core Concepts",
227201
items: [
228-
{
229-
label: "Architecture Decision Records",
230-
slug: "concepts/adrs",
231-
},
202+
{ label: "Architecture Decision Records", slug: "concepts/adrs" },
232203
{ label: "Rules", slug: "concepts/rules" },
233204
{ label: "Domains", slug: "concepts/domains" },
234205
],
@@ -239,26 +210,11 @@ export default defineConfig({
239210
{ label: "Writing ADRs", slug: "guides/writing-adrs" },
240211
{ label: "Writing Rules", slug: "guides/writing-rules" },
241212
{ label: "CI Integration", slug: "guides/ci-integration" },
242-
{
243-
label: "Claude Code Plugin",
244-
slug: "guides/claude-code-plugin",
245-
},
246-
{
247-
label: "VS Code Plugin",
248-
slug: "guides/vscode-plugin",
249-
},
250-
{
251-
label: "Copilot CLI Plugin",
252-
slug: "guides/copilot-cli-plugin",
253-
},
254-
{
255-
label: "Cursor Integration",
256-
slug: "guides/cursor-integration",
257-
},
258-
{
259-
label: "Pre-commit Hooks",
260-
slug: "guides/pre-commit-hooks",
261-
},
213+
{ label: "Claude Code Plugin", slug: "guides/claude-code-plugin" },
214+
{ label: "VS Code Plugin", slug: "guides/vscode-plugin" },
215+
{ label: "Copilot CLI Plugin", slug: "guides/copilot-cli-plugin" },
216+
{ label: "Cursor Integration", slug: "guides/cursor-integration" },
217+
{ label: "Pre-commit Hooks", slug: "guides/pre-commit-hooks" },
262218
],
263219
},
264220
{

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"private": true,
44
"type": "module",
55
"scripts": {
6-
"dev": "astro dev",
76
"build": "bun run scripts/generate-llms-full.ts && astro build",
7+
"dev": "astro dev",
88
"preview": "astro preview"
99
},
1010
"dependencies": {

docs/scripts/generate-og-image.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
import { readFileSync } from "node:fs";
2+
import { join } from "node:path";
3+
14
/**
25
* Generates the default Open Graph image (1200x630 PNG) for social sharing.
36
* Reads the branded SVG from the website repo and converts it to PNG via sharp.
47
*
58
* Run: bun run docs/scripts/generate-og-image.ts
69
*/
710
import sharp from "sharp";
8-
import { join } from "node:path";
9-
import { readFileSync } from "node:fs";
1011

1112
const svgPath = join(import.meta.dirname, "..", "public", "og-image.svg");
1213
const outputPath = join(import.meta.dirname, "..", "public", "og-image.png");

0 commit comments

Comments
 (0)