Repository navigation
chore: strict Credo and ESLint, and the JavaScript layout enforced - #16
Merged
Merged
Conversation
Credo's strict mode also reports its low-priority checks. It found 18 issues, all fixed in the code rather than switched off: nested modules called by their full name now have an alias at the top of the module, aliases are in alphabetical order, and a doc string with escaped quotes uses a sigil. The Credo config now sets strict mode, so a plain `mix credo` reports what CI reports. CI runs `mix credo --strict` and compiles the tests with `mix test --warnings-as-errors`, so a warning in a test file fails the build like one in the server code does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Ayla Croft <dev@scriptkittyos.com>
…ules ESLint now checks the layout the code already follows, with @stylistic/eslint-plugin (the formatting rules ESLint moved out of its core): two-space indent, double quotes, semicolons, trailing commas, a multi-line ternary's ? and : at the start of the line, and the usual spacing. `npm run lint:fix` applies it. Adopting it changed 12 files by 22 lines. Prettier was measured instead and not adopted: at print widths from 100 to 200 it rewrote 137 to 188 files and grew what the popup loads at open by 1.6 to 6.5 KB, past its 128 KB cap. ESLint also gains stricter rules that catch real mistakes: === except for `x == null`, no shadowed names, no unused arguments, no assignments to parameters, no expression statements, no closures over a loop's changing variables, eval and its relatives banned, and const and modern operators where they apply. Every finding was fixed in the code (renames, blocks instead of comma expressions, Number() instead of unary +); there are no new suppressions. What the popup loads at open is 29 bytes smaller. Playwright tests may still shadow a name: a callback that runs in the browser takes the test's values under the same name. docs/CODING_STANDARDS.md and CONTRIBUTING.md say what is enforced and by which tool, and that Credo runs in strict mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Ayla Croft <dev@scriptkittyos.com>
The stricter ESLint rules (no-loop-func) flagged bestpractices-links.mjs, which landed on main after this branch started: a closure inside the loop read the loop's header variable. A plain loop builds the cells instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Ayla Croft <dev@scriptkittyos.com>
added 5 commits
October 6, 2026 16:14
…into silver/lint-strict
…ilver/lint-strict
…rict # Conflicts: # CONTRIBUTING.md
HackTuah
pushed a commit
that referenced
this pull request
Oct 6, 2026
…re Met with PR #16 PR #16 runs Credo in strict mode and tests with --warnings-as-errors, adds about 60 stricter ESLint rules, and enforces the JavaScript layout with @stylistic/eslint-plugin. These were the last two silver MUSTs. Merge #16 before this, so the answers are true when they are saved on the form. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Ayla Croft <dev@scriptkittyos.com>
HackTuah
pushed a commit
that referenced
this pull request
Oct 6, 2026
The stricter ESLint rules in PR #16 (no-shadow) flag the page builder's local 'links', which hides the exported links(). Renamed to 'parts'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Ayla Croft <dev@scriptkittyos.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This covers silver
warnings_strictandcoding_standards_enforced.credo:disable: 12 nested module calls now use aliases, 5 aliases are reordered, and 1 escaped doc string changed.server/.credo.exssetsstrict: true, so a plainmix credoreports what CI reports.mix credo --strictandmix test --warnings-as-errors.@stylistic/eslint-plugin5.10.0 (pinned dev dependency). About 45 rules match how the code is already written: 12 files changed, +22/−26, all whitespace and quotes.npm run lint:fixapplies them.eqeqeq(except== null),no-shadow, unused arguments,no-param-reassign,no-unused-expressions,no-loop-func,prefer-const,no-var,no-eval/no-implied-eval/no-new-func,no-implicit-coercion,curly, and others. About 70 findings are fixed in code, with no new suppressions. The popup is now 29 bytes smaller at open.docs/CODING_STANDARDS.mdsays what each tool enforces and why; CONTRIBUTING.md is updated.main, the new rules caught a closure inside a loop inscripts/bestpractices-links.mjs(merged in docs(best-practices): answer every badge level, with links that prefill the form #10). It's fixed here.Not enforced, with reasons: line length and one-argument-per-line (both would reflow and grow the popup),
no-implicit-globals(background.jsis a classic service-worker script, and its globals are used by tests), HTML/CSS formatting (popup budget).Checked (after merging main)
npm run lint: 0 errors.npm test: 1873 pass.npm run perf: all ok.npx playwright test: 99 passed, 4 skipped (on the branch before the merge).reuse lint,check-old-name,check-base-neutralandcheck-forbidden-filespass.mix format,compile --warnings-as-errorsandmix credo --strict("found no issues") pass.mix test --warnings-as-errors: 1000 tests, 0 failures.Expect small
ci.ymlmerge conflicts with #13, #15 and the coverage PR (the same server job lines). I'll resolve them as each one lands.🤖 Generated with Claude Code