Conversation
…commended rules (but exclude some style stuff so map_item isn't a pain); mini gab style change
dale-wahl
marked this pull request as ready for review
September 9, 2026 13:41
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.
Adding automated linting and testing, mainly for the pull requests 4CAT opens automatically. Those carry
map_itemfunctions translated from Python by a language model, and nothing looked at them until a person did. Last batch arrived calling five helper functions that the same batch had deleted.Continuous integration
.github/workflows/ci.ymlrunsnpm testandnpm run linton every push and pull request, drafts includednpm run test:compare) stays out of CI; it needs a reachable 4CAT, an API key and dataset keys. (But we can look at add that next!)Linting
eslint.config.mjsat the repository root, running ESLint's recommended set of 58 rules.no-undefis the one that matters most here to catch those helpers called but never defined.map_itembodies trip them, a sync replaces those blocks anyway, and none of them change what the code does.no-prototype-builtinsis off too, and that one is not cosmetic:obj.hasOwnProperty(key)throws if a platform's JSON has a key by that name. 31 sites acrossjs/andmodules/, worth its own PR.eslintand@eslint/jsare pinned exactly becauserecommendedis a moving list, so upgrading should be a decision rather than a side effect.tests/andpopup/are excluded, with the reasons in the comments.Housekeeping
tests/Dockerfile.testdeleted; I was using it but it stopped working and isn't neededenginesadded totests/package.json: ESLint puts the Node floor at 20.19 so this made sense.eslint.config.mjsexcluded from the release zip scriptsmodules/gab.js(hand-written capture code, not a generated block), sono-self-assigncan stay on.