Add Prettier (with prettier-plugin-svelte), set to the current 4-space indent, and format the repo
Add ESLint (with eslint-plugin-svelte and typescript-eslint) and fix or suppress the existing errors
Add lint and format scripts to package.json
The repo has no formatter or linter, so line length and style drift freely.
- 1,080 lines are over 200 characters; the longest is 1,868 (`collections/launches/[id]/+page.svelte:206`).
- There's no Prettier or ESLint config, and `package.json:10-29` has no `lint` or `format` script.
CI is tracked separately in #100.
**Fix**
- [x] Add Prettier (with `prettier-plugin-svelte`), set to the current 4-space indent, and format the repo
- [x] Add ESLint (with `eslint-plugin-svelte` and `typescript-eslint`) and fix or suppress the existing errors
- [x] Add `lint` and `format` scripts to `package.json`
goddard
changed title from Add formatting/linting and CI; break up oversized files to Add formatting and linting (Prettier and ESLint)2026-10-09 15:37:36 -04:00
Reviewed 16469e2d43. Prettier and ESLint are in place, the whole repo passes npm run lint, and the reformat didn't change behaviour, so I'm closing this.
Checklist
Add Prettier and format the repo..prettierrc.json uses prettier-plugin-svelte with a 4-space indent, single quotes and a 100-column width. .prettierignore skips the lockfile and the generated static/agent/. prettier --check . passes, and lines over 200 characters dropped from 1,080 to 57.
Add ESLint and fix or suppress the existing errors.eslint.config.js uses the recommended JavaScript, typescript-eslint and eslint-plugin-svelte configs, plus eslint-config-prettier. eslint . exits 0 with no warnings. Each of the four disabled Svelte rules has a comment, and every inline suppression gives a reason.
Add lint and format scripts.package.json has lint (prettier --check . && eslint .) and format (prettier --write .). Both READMEs list npm run lint with the other checks, and the development guide explains the setup.
Review notes
To confirm the 711-file reformat was formatting only, I ran the same Prettier config over the parent commit and diffed the result against this one. The 67 files that differ hold ESLint fixes:
void x for reactive dependency reads in $effect and $derived
let changed to const
unused code removed (composedCfgPath in beta.ts, getIntegrations in stores/fleet.ts, refreshedAt on the campaigns page)
ternary statements rewritten as if/else
{ cause } added to rethrown errors
a redundant \/ escape dropped inside the regex classes in telemetry.ts (same match)
I checked the edits that could have changed behaviour:
the removed active = undefined in rebalancing/index.ts is never read afterwards
reason in status-evidence.ts and notice in maintenance/+server.ts are assigned on every path
the catch in DeployServerDialog.svelte never used its error
Checks run at HEAD:
npm run lint passes
npm run check reports 0 errors and 0 warnings across 1,192 files
the full suite passes (208 files, 2,629 tests)
npm run test:agent passes (285 tests)
npm run build succeeds
npm audit finds 0 vulnerabilities with the new dev dependencies
engines now requires Node 22.13 or newer for ESLint 10. The Dockerfile's node:22-alpine already meets that, and the development guide says so.
Minor and non-blocking: nothing runs npm run lint automatically yet; that's #100.
Reviewed 16469e2d43bcde12dd3a29c432a617f3c38c7049. Prettier and ESLint are in place, the whole repo passes `npm run lint`, and the reformat didn't change behaviour, so I'm closing this.
**Checklist**
- [x] **Add Prettier and format the repo.** `.prettierrc.json` uses `prettier-plugin-svelte` with a 4-space indent, single quotes and a 100-column width. `.prettierignore` skips the lockfile and the generated `static/agent/`. `prettier --check .` passes, and lines over 200 characters dropped from 1,080 to 57.
- [x] **Add ESLint and fix or suppress the existing errors.** `eslint.config.js` uses the recommended JavaScript, `typescript-eslint` and `eslint-plugin-svelte` configs, plus `eslint-config-prettier`. `eslint .` exits 0 with no warnings. Each of the four disabled Svelte rules has a comment, and every inline suppression gives a reason.
- [x] **Add `lint` and `format` scripts.** `package.json` has `lint` (`prettier --check . && eslint .`) and `format` (`prettier --write .`). Both READMEs list `npm run lint` with the other checks, and the development guide explains the setup.
**Review notes**
- To confirm the 711-file reformat was formatting only, I ran the same Prettier config over the parent commit and diffed the result against this one. The 67 files that differ hold ESLint fixes:
- `void x` for reactive dependency reads in `$effect` and `$derived`
- `let` changed to `const`
- unused code removed (`composedCfgPath` in `beta.ts`, `getIntegrations` in `stores/fleet.ts`, `refreshedAt` on the campaigns page)
- ternary statements rewritten as `if`/`else`
- `{ cause }` added to rethrown errors
- a redundant `\/` escape dropped inside the regex classes in `telemetry.ts` (same match)
- I checked the edits that could have changed behaviour:
- the removed `active = undefined` in `rebalancing/index.ts` is never read afterwards
- `reason` in `status-evidence.ts` and `notice` in `maintenance/+server.ts` are assigned on every path
- the `catch` in `DeployServerDialog.svelte` never used its error
- Checks run at HEAD:
- `npm run lint` passes
- `npm run check` reports 0 errors and 0 warnings across 1,192 files
- the full suite passes (208 files, 2,629 tests)
- `npm run test:agent` passes (285 tests)
- `npm run build` succeeds
- `npm audit` finds 0 vulnerabilities with the new dev dependencies
- `engines` now requires Node 22.13 or newer for ESLint 10. The Dockerfile's `node:22-alpine` already meets that, and the development guide says so.
- Minor and non-blocking: nothing runs `npm run lint` automatically yet; that's #100.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The repo has no formatter or linter, so line length and style drift freely.
collections/launches/[id]/+page.svelte:206).package.json:10-29has nolintorformatscript.CI is tracked separately in #100.
Fix
prettier-plugin-svelte), set to the current 4-space indent, and format the repoeslint-plugin-svelteandtypescript-eslint) and fix or suppress the existing errorslintandformatscripts topackage.jsonAdd formatting/linting and CI; break up oversized filesto Add formatting and linting (Prettier and ESLint)Reviewed
16469e2d43. Prettier and ESLint are in place, the whole repo passesnpm run lint, and the reformat didn't change behaviour, so I'm closing this.Checklist
.prettierrc.jsonusesprettier-plugin-sveltewith a 4-space indent, single quotes and a 100-column width..prettierignoreskips the lockfile and the generatedstatic/agent/.prettier --check .passes, and lines over 200 characters dropped from 1,080 to 57.eslint.config.jsuses the recommended JavaScript,typescript-eslintandeslint-plugin-svelteconfigs, pluseslint-config-prettier.eslint .exits 0 with no warnings. Each of the four disabled Svelte rules has a comment, and every inline suppression gives a reason.lintandformatscripts.package.jsonhaslint(prettier --check . && eslint .) andformat(prettier --write .). Both READMEs listnpm run lintwith the other checks, and the development guide explains the setup.Review notes
void xfor reactive dependency reads in$effectand$derivedletchanged toconstcomposedCfgPathinbeta.ts,getIntegrationsinstores/fleet.ts,refreshedAton the campaigns page)if/else{ cause }added to rethrown errors\/escape dropped inside the regex classes intelemetry.ts(same match)active = undefinedinrebalancing/index.tsis never read afterwardsreasoninstatus-evidence.tsandnoticeinmaintenance/+server.tsare assigned on every pathcatchinDeployServerDialog.sveltenever used its errornpm run lintpassesnpm run checkreports 0 errors and 0 warnings across 1,192 filesnpm run test:agentpasses (285 tests)npm run buildsucceedsnpm auditfinds 0 vulnerabilities with the new dev dependenciesenginesnow requires Node 22.13 or newer for ESLint 10. The Dockerfile'snode:22-alpinealready meets that, and the development guide says so.npm run lintautomatically yet; that's #100.