Skip to content

Commit 01093dc

Browse files
authored
refactor: name modules by topic and restructure the docs (#1134)
Replace the util and grab-bag modules with topic-named modules, tidy the repo root and tooling config, and split the contributor docs into topic guides that AGENTS.md routes to. No behavior change. - Split `core/` into `cli/`, `storage/` and `vscode/`, and move `container.ts` next to `extension.ts`. - Split grab-bag modules by topic (`common/fs`, `common/strings`, `common/url`, `api/models`, `error/normalize`, `logging/ids`, `oauth/tokens`), and move single-consumer helpers into their consumer. - Rename the `utils` modules in the webview packages after their topic. Tests move to mirror their source path. - Fold `usage.md` into the README, move `esbuild.mjs` to `scripts/`, and replace `.vscodeignore` with a `files` allowlist. - Merge the oxlint configs, remove the Prettier leftovers and unused devDependencies, and keep the ESLint cache in `node_modules`. - Update the Nix flake: pin nixpkgs, use Node 24 and nixpkgs' pnpm. - Shorten AGENTS.md to a router for `docs/` guides (code structure, architecture, testing, tooling) and `packages/AGENTS.md`.
1 parent 72d2975 commit 01093dc

245 files changed

Lines changed: 2461 additions & 2452 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.

‎.devcontainer/devcontainer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"customizations": {
88
"vscode": {
99
"extensions": [
10-
"esbenp.prettier-vscode",
10+
"oxc.oxc-vscode",
1111
"dbaeumer.vscode-eslint",
1212
"vitest.explorer",
1313
"ms-vscode.extension-test-runner"

‎.gitignore‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1+
node_modules/
12
/dist/
2-
/node_modules/
33
/out/
44
/.vscode-test/
5-
/.nyc_output/
65
/coverage/
76
/.pnpm-store/
87
*.vsix
98
pnpm-debug.log
10-
.eslintcache
11-
12-
# Workspace packages
13-
packages/*/node_modules/
149

1510
# Storybook
1611
storybook-static/
1712
debug-storybook.log
13+
14+
# Personal agent instructions
15+
AGENTS.local.md

‎.oxfmtrc.jsonc‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,11 @@
33
"printWidth": 80,
44
// Disabled to avoid churning the key order of every package.json in the repo.
55
"sortPackageJson": false,
6+
// Oxfmt also skips everything in .gitignore.
67
"ignorePatterns": [
7-
"/dist/",
8-
"/node_modules/",
9-
"/out/",
10-
"/.vscode-test/",
11-
"/coverage/",
12-
"*.vsix",
138
"flake.lock",
149
"pnpm-lock.yaml",
15-
"/storybook-static/",
10+
// Golden snapshots and generated VS Code theme dumps are written verbatim.
1611
"**/__golden__/",
1712
".storybook/themes/generated/"
1813
],

‎.oxlintrc.jsonc‎

Lines changed: 85 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"$schema": "./node_modules/oxlint/configuration_schema.json",
3-
"extends": [".oxlintrc.react.jsonc"],
4-
"plugins": ["unicorn"],
3+
"plugins": ["unicorn", "typescript", "oxc"],
54
"categories": {
65
"correctness": "error"
76
},
@@ -21,6 +20,88 @@
2120
"storybook-static/**"
2221
],
2322
"overrides": [
23+
{
24+
"files": ["packages/**/*.{ts,tsx}"],
25+
"rules": {
26+
"react/exhaustive-deps": "off",
27+
"react/preserve-manual-memoization": "error",
28+
"react/incompatible-library": "warn",
29+
"react/error-boundaries": "error",
30+
"react/globals": "error",
31+
"react/immutability": "error",
32+
"react/jsx-no-comment-textnodes": "warn",
33+
"react/no-array-index-key": "warn",
34+
"react/no-clone-element": "warn",
35+
"react/no-direct-mutation-state": "error",
36+
"react/purity": "warn",
37+
"react/refs": "error",
38+
"react/rules-of-hooks": "error",
39+
"react/set-state-in-effect": "warn",
40+
"react/set-state-in-render": "error",
41+
"react/static-components": "error",
42+
"react/unsupported-syntax": "error",
43+
"react/use-memo": "error",
44+
"react-x/dom-no-dangerously-set-innerhtml-with-children": "error",
45+
"react-x/dom-no-dangerously-set-innerhtml": "warn",
46+
"react-x/dom-no-find-dom-node": "error",
47+
"react-x/dom-no-flush-sync": "error",
48+
"react-x/dom-no-hydrate": "error",
49+
"react-x/dom-no-render-return-value": "error",
50+
"react-x/dom-no-render": "error",
51+
"react-x/dom-no-script-url": "warn",
52+
"react-x/dom-no-unsafe-iframe-sandbox": "warn",
53+
"react-x/dom-no-use-form-state": "error",
54+
"react-x/dom-no-void-elements-with-children": "error",
55+
"react-x/jsx-no-children-prop-with-children": "error",
56+
"react-x/jsx-no-children-prop": "warn",
57+
"react-x/jsx-no-key-after-spread": "error",
58+
"react-x/jsx-no-leaked-dollar": "error",
59+
"react-x/jsx-no-leaked-semicolon": "warn",
60+
"react-x/jsx-no-namespace": "error",
61+
"react-x/naming-convention-context-name": "warn",
62+
"react-x/naming-convention-id-name": "warn",
63+
"react-x/naming-convention-ref-name": "warn",
64+
"react-x/no-access-state-in-setstate": "error",
65+
"react-x/no-children-count": "warn",
66+
"react-x/no-children-for-each": "warn",
67+
"react-x/no-children-map": "warn",
68+
"react-x/no-children-only": "warn",
69+
"react-x/no-children-to-array": "warn",
70+
"react-x/no-component-will-mount": "error",
71+
"react-x/no-component-will-receive-props": "error",
72+
"react-x/no-component-will-update": "error",
73+
"react-x/no-context-provider": "warn",
74+
"react-x/no-create-ref": "error",
75+
"react-x/no-forward-ref": "warn",
76+
"react-x/no-missing-key": "error",
77+
"react-x/no-nested-component-definitions": "error",
78+
"react-x/no-nested-lazy-component-declarations": "error",
79+
"react-x/no-set-state-in-component-did-mount": "warn",
80+
"react-x/no-set-state-in-component-did-update": "warn",
81+
"react-x/no-set-state-in-component-will-update": "warn",
82+
"react-x/no-unnecessary-use-prefix": "warn",
83+
"react-x/no-unsafe-component-will-mount": "warn",
84+
"react-x/no-unsafe-component-will-receive-props": "warn",
85+
"react-x/no-unsafe-component-will-update": "warn",
86+
"react-x/no-unused-class-component-members": "warn",
87+
"react-x/no-use-context": "warn",
88+
"react-x/rsc-function-definition": "error",
89+
"react-x/use-state": "warn",
90+
"react-x/web-api-no-leaked-event-listener": "warn",
91+
"react-x/web-api-no-leaked-fetch": "error",
92+
"react-x/web-api-no-leaked-intersection-observer": "warn",
93+
"react-x/web-api-no-leaked-interval": "warn",
94+
"react-x/web-api-no-leaked-resize-observer": "warn",
95+
"react-x/web-api-no-leaked-timeout": "warn"
96+
},
97+
"jsPlugins": [
98+
{
99+
"name": "react-x",
100+
"specifier": "./node_modules/@eslint-react/eslint-plugin/dist/index.js"
101+
}
102+
],
103+
"plugins": ["react"]
104+
},
24105
{
25106
"files": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
26107
"plugins": ["typescript", "import"],
@@ -166,11 +247,7 @@
166247
}
167248
},
168249
{
169-
"files": [
170-
"esbuild.mjs",
171-
"scripts/*.mjs",
172-
".storybook/themes/*.{mjs,cjs}"
173-
],
250+
"files": ["scripts/*.mjs", ".storybook/themes/*.{mjs,cjs}"],
174251
"env": {
175252
"node": true
176253
}
@@ -268,7 +345,7 @@
268345
}
269346
},
270347
{
271-
"files": ["src/core/contextManager.ts", "src/core/commandManager.ts"],
348+
"files": ["src/vscode/contextManager.ts", "src/vscode/commandManager.ts"],
272349
"rules": {
273350
"eslint-js/no-restricted-syntax": "off"
274351
}

‎.oxlintrc.react.jsonc‎

Lines changed: 0 additions & 87 deletions
This file was deleted.

‎.prettierignore‎

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎.prettierrc.json‎

Lines changed: 0 additions & 10 deletions
This file was deleted.

‎.vscode/launch.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"type": "extensionHost",
77
"request": "launch",
88
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
9-
"outFiles": ["${workspaceFolder}/dist/**/*.js"]
9+
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
10+
"preLaunchTask": "build"
1011
}
1112
]
1213
}

‎.vscode/tasks.json‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"version": "2.0.0",
33
"tasks": [
44
{
5-
"type": "typescript",
6-
"tsconfig": "tsconfig.json",
7-
"problemMatcher": ["$tsc"],
8-
"group": "build",
9-
"label": "tsc: build"
5+
"label": "build",
6+
"type": "npm",
7+
"script": "build",
8+
"group": { "kind": "build", "isDefault": true },
9+
"problemMatcher": []
1010
}
1111
]
1212
}

‎.vscodeignore‎

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)