Skip to content

chore: improve tooling#19

Merged
mcmunder merged 1 commit into
mainfrom
chore/improve-tooling
Mar 27, 2026
Merged

chore: improve tooling#19
mcmunder merged 1 commit into
mainfrom
chore/improve-tooling

Conversation

@mcmunder

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 27, 2026 09:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository’s developer tooling and applies consistent formatting across the TypeScript codebase, adding linting/formatting automation (ESLint flat config, oxfmt, lint-staged, git hooks) alongside associated doc/workflow updates.

Changes:

  • Add ESLint (flat config) + oxfmt formatting scripts and config; wire up pre-commit via lint-staged.
  • Reformat existing TS sources/tests to the new style (semicolons, quotes, wrapping).
  • Minor docs/workflow quoting tweaks aligned with the tooling changes.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/transcript.ts Formatting-only changes (semi/line wrapping).
src/notes-reader.ts Formatting changes plus a modified BunShellLike type (currently introduces a TS error).
src/notes-reader.test.ts Formatting-only changes.
src/index.ts Formatting-only changes.
src/index.test.ts Formatting-only changes.
package.json Adds lint/format scripts + lint-staged hook and new devDependencies.
eslint.config.js Introduces ESLint flat configuration for TS + prettier compatibility rules.
commitlint.config.ts Formatting-only change (semicolon).
bun.lock Lockfile updates for newly added tooling dependencies.
AGENTS.md Documentation formatting updates (currently includes a rendering regression at the end).
.oxfmtrc.json Adds oxfmt configuration.
.lintstagedrc.json Adds lint-staged configuration.
.github/workflows/release.yml Quote style update for workflow inputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AGENTS.md Outdated
Comment on lines +218 to +219
> `Bun.$\`ls\``instead of execa.
Bun automatically loads`.env` — don't use dotenv.

Copilot AI Mar 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last two lines lost the blockquote marker and spacing around inline code, which breaks the rendered Markdown (e.g. `Bun.$\`ls\instead and loads.env ``). Please restore the intended > prefix and spaces so this section renders correctly.

Copilot uses AI. Check for mistakes.
Comment thread .lintstagedrc.json Outdated
Comment thread package.json
Comment thread package.json Outdated
Comment thread src/notes-reader.ts Outdated
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(strings: TemplateStringsArray, ...values: any[]): { text(): Promise<string> }
// eslint-disable-next-line @typescript-eslint/no-explicit-any, no-unused-vars
(strings: TemplateStringsArray, ...values: any): { text(): Promise<string> };

Copilot AI Mar 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BunShellLike's rest parameter is typed as ...values: any, but TypeScript requires rest parameters to be an array/tuple type (e.g. any[] / unknown[]). As written, this will fail typechecking and may also confuse ESLint/TS parser.

Suggested change
(strings: TemplateStringsArray, ...values: any): { text(): Promise<string> };
(strings: TemplateStringsArray, ...values: any[]): { text(): Promise<string> };

Copilot uses AI. Check for mistakes.
@mcmunder mcmunder force-pushed the chore/improve-tooling branch 2 times, most recently from eebedc0 to 7579c23 Compare March 27, 2026 09:15
Copilot AI review requested due to automatic review settings March 27, 2026 09:15
@mcmunder mcmunder force-pushed the chore/improve-tooling branch from 7579c23 to d9de351 Compare March 27, 2026 09:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread eslint.config.js Outdated
Comment on lines +31 to +41
plugins: {
"@typescript-eslint": tseslint.plugin,
},
rules: {
...js.configs.recommended.rules,
...tseslint.configs.recommended.rules,
...prettier.rules,
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "warn",
"no-console": "error",
},

Copilot AI Mar 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new ESLint flat config appears to be applying recommended configs incorrectly by spreading .rules from typescript-eslint (and @eslint/js) instead of including the recommended config objects/arrays. In typescript-eslint v8, configs.recommended is a config array, so tseslint.configs.recommended.rules will be undefined and the recommended TS rules won’t be enabled. Consider using js.configs.recommended and ...tseslint.configs.recommended (plus prettier) as config entries, then override rules in a final object.

Copilot uses AI. Check for mistakes.
Comment thread commitlint.config.ts Outdated
@mcmunder mcmunder force-pushed the chore/improve-tooling branch from d9de351 to 6cbdcd0 Compare March 27, 2026 09:23
@mcmunder mcmunder marked this pull request as ready for review March 27, 2026 09:24
Copilot AI review requested due to automatic review settings March 27, 2026 09:24
@mcmunder mcmunder merged commit d390bb7 into main Mar 27, 2026
4 checks passed
@mcmunder mcmunder deleted the chore/improve-tooling branch March 27, 2026 09:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/notes-reader.ts
Comment on lines +11 to +12
// eslint-disable-next-line @typescript-eslint/no-explicit-any, no-unused-vars
(strings: TemplateStringsArray, ...values: any): { text(): Promise<string> }

Copilot AI Mar 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BunShellLike defines a rest parameter as ...values: any, but TypeScript requires rest parameters to be an array/tuple type. This will fail type-checking; use any[] / unknown[] (and adjust the eslint-disable accordingly) so call sites like the tests’ ...values: unknown[] remain compatible.

Suggested change
// eslint-disable-next-line @typescript-eslint/no-explicit-any, no-unused-vars
(strings: TemplateStringsArray, ...values: any): { text(): Promise<string> }
// eslint-disable-next-line no-unused-vars
(strings: TemplateStringsArray, ...values: unknown[]): { text(): Promise<string> }

Copilot uses AI. Check for mistakes.
Comment thread AGENTS.md
> `Bun.serve()` supports WebSockets, HTTPS, and routes — don't use Express.
> HTML imports with `Bun.serve()` for frontend — don't use Vite.
> `Bun.$\`ls\`` instead of execa.
> `Bun.$` instead of execa.

Copilot AI Mar 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guidance line `Bun.$` instead of execa. is ambiguous because Bun.$ is a template tag and needs a command template literal to be actionable. Consider updating this to a syntactically correct example (and format it so the backticks render correctly in Markdown), e.g. showing Bun.$\ls`` or similar.

Suggested change
> `Bun.$` instead of execa.
> Use Bun's process spawning helper (for example, `await Bun.$`git status`;`) instead of execa.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants