chore(lint): extend ESLint to electron and build scripts, fix existing errors - #34
Merged
Merged
Conversation
…g errors
`npm run lint` covered only src/ and the two root config files: the flat
config's single block matched `**/*.{js,jsx}`, so every `electron/*.cjs`
file — main, preload, and the VRoid Hub modules — was parsed with zero
rules applied, and `scripts/*.mjs` was never matched at all. Linting was
also red on main, so it could not be used as a gate.
Config:
- Scope the renderer block to `src/` (browser globals + React rules).
- Add an `electron/**/*.cjs` block: commonjs, Node globals, recommended.
The suites need no extra globals — they require('node:test').
- Add blocks for `*.config.js` and `scripts/**` with Node globals.
- Move `--max-warnings=0` into the `lint` script so local and CI agree.
Fixes surfaced by the wider net:
- VoicePanel destructured an unused `audioFile`; the file input is
uncontrolled and only needs the setter. Dropped the prop at the call
site too.
- VrmAvatar read `group.current` in effect cleanup. Capture the group
once and use it for both attach and detach, so a swap detaches from
the group it attached to.
- make-icons dropped a dead `installerAssets` array that duplicated the
sizes already inlined in the PowerShell block — a trap if someone
edited one and not the other.
Coverage: 40 → 55 files. lint, build, and the 26 electron tests pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 7, 2026
Contributor
|
Thanks @AUDOSt0ck1ng, this looks good to merge as a standalone PR. Noted as a prerequisite for #4 / #35, those will follow after this lands and next review. No blockers from my side. |
rosspeili
added a commit
to AUDOSt0ck1ng/avatar
that referenced
this pull request
Aug 7, 2026
…PAHLS#34, ARPAHLS#35) Record Unreleased notes for ESLint coverage and GitHub Actions CI, add the README CI badge, mark roadmap CI done, document the workflow in project layout, and expand CONTRIBUTING for changelog style, CI gates, and human/AI ripple-effect guidance.
rosspeili
added a commit
that referenced
this pull request
Aug 7, 2026
* ci: run lint, tests, and production build on PRs and main Closes #4. Label sync was the only workflow, so renderer and Electron regressions could land with no automated signal. - Node 22 (Vite 7 needs ^20.19.0 || >=22.12.0), npm cache keyed on avatar/package-lock.json. - Runs `npm test` as well as lint and build: the 26 Electron unit tests existed but nothing ever ran them. - Skips the Electron binary download — the tested modules deliberately avoid require('electron'), so ~100 MB is dead weight here. - No dist:win: Windows-specific and slow, deferred as the issue suggests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * ci: bump checkout and setup-node to v5 v4 declares the node20 runtime, which GitHub now force-runs on Node 24 and warns about on every run. v5 declares node24 natively. No input changes: node-version, cache, and cache-dependency-path are unchanged between v4 and v5. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs: changelog, CI badge, and CONTRIBUTING ripples for lint + CI (#34, #35) Record Unreleased notes for ESLint coverage and GitHub Actions CI, add the README CI badge, mark roadmap CI done, document the workflow in project layout, and expand CONTRIBUTING for changelog style, CI gates, and human/AI ripple-effect guidance. --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: rosspeili <vpeilivanidis@gmail.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.
Why
npm run lintonly ever checkedsrc/plus the two root config files. The flat config had a single block matching**/*.{js,jsx}, so everyelectron/*.cjsfile —main.cjs,preload.cjs, and the VRoid Hub modules — was parsed with zero rules applied, andscripts/*.mjswas never matched at all.Linting was also red on
main, which meant it could not be used as a merge gate. This PR is a prerequisite for the CI workflow requested in #4: without it, that workflow fails on its first run.Config changes
src/(browser globals + React rules).electron/**/*.cjsblock: commonjs, Node globals, recommended. The test suites need no extra globals — theyrequire('node:test').*.config.jsandscripts/**with Node globals.--max-warnings=0into thelintscript so local and CI agree.Fixes surfaced by the wider net
VoicePanel.jsx— destructured an unusedaudioFile; the file input is uncontrolled and only needs the setter. Dropped the prop at the call site too.VrmAvatar.jsx— readgroup.currentin effect cleanup. Capture the group once and use it for both attach and detach, so a model swap detaches from the group it attached to. This one is an actual bug, not just a lint complaint.scripts/make-icons.mjs— dropped a deadinstallerAssetsarray that duplicated the sizes already inlined in the PowerShell block: a trap if someone edited one and not the other.Verification
Lint coverage goes from 40 to 55 files.
npm run lint,npm run build, and the 26electron/*.test.cjstests all pass.🤖 Generated with Claude Code