Repository navigation
Standardize package.json Jest and Prettier configuration across Eliware #9
Description
Activity
Audit of all repositories listed under
repositoriesin eliware/docs/eliware/docs/repo-map.yaml, excluding no mapped entries (the map'sexempt-forksnames are not present in the list). Audited each repository's default-branchpackage.jsonJest/Prettier properties and recursively searched its Git tree for standalone Jest and Prettier config files.Coverage: 102 mapped repos; 99 readable Git trees; 3 empty repositories could not be inspected: eliware/sangah-meta, eliware/sangah-requests, eliware/netdoc-config.
Jest inventory
J1 — Configuration object (3 repos): eliware/test, eliware/codescope, eliware/agentx-cli
{ "collectCoverageFrom": [ "src/**/*.mjs" ], "coverageReporters": [ "text", "json-summary" ] }J2 — Configuration object (22 repos): eliware/documentation-template, eliware/docs, eliware/operations, eliware/workspace-template, eliware/ceo, eliware/coo, eliware/sysadmin, eliware/network, eliware/storage, eliware/dba, eliware/devops, eliware/gitops, eliware/sre, eliware/qa, eliware/marketing, eliware/tasklist, eliware/elera-cli, eliware/gitops-k8s, eliware/vyops-cfovh, eliware/vyops-core1, eliware/vyops-core2, eliware/vyops-test
{}J3 — Configuration object (4 repos): eliware/library-template, eliware/redact, eliware/log, eliware/elid-client
{ "testEnvironment": "node", "testMatch": [ "**/tests/**/*.test.mjs" ], "collectCoverageFrom": [ "src/**/*.mjs" ], "coverageReporters": [ "text", "json-summary" ] }J4 — Configuration object (1 repos): eliware/path
{ "collectCoverageFrom": [ "src/current-path.mjs", "src/conversions.mjs" ] }J5 — No package.json ${label} property (26 repos): eliware/errors, eliware/signals, eliware/snowflake, eliware/common, eliware/discord-webhook, eliware/elera-lib, eliware/elera-client, eliware/rabbitmq, eliware/ssh-client, eliware/tagit, eliware/vyops, eliware/mcpli, eliware/elera-server, eliware/elera-example, eliware/elid, eliware/checkd, eliware/ipfixd, eliware/ipfix, eliware/syslogd, eliware/eliware, eliware/node-test-private, eliware/node-test-public, eliware/piano, eliware/sangah-landing, eliware/ttsbot, eliware/ra
J6 — Configuration object (7 repos): eliware/discord, eliware/resampler, eliware/application-template, eliware/cli-template, eliware/web-template, eliware/mcp-server-template, eliware/translate
{ "testEnvironment": "node", "testMatch": [ "**/?(*.)+(spec|test).[jt]s?(x)", "**/?(*.)+(spec|test).mjs" ] }J7 — Configuration object (2 repos): eliware/mcp-server, eliware/mailctl
{ "testEnvironment": "node", "testMatch": [ "**/?(*.)+(spec|test).mjs" ] }J8 — Configuration object (13 repos): eliware/mcp-client, eliware/openai, eliware/openweathermap, eliware/discord-template, eliware/mailbot, eliware/dev-web, eliware/funnel, eliware/ask, eliware/basement, eliware/discommand, eliware/developer, eliware/puppeteer, eliware/gluster-http
{ "testEnvironment": "node", "testMatch": [ "**/?(*.)+(spec|test).[jt]s?(x)", "**/?(*.)+(spec|test).mjs", "**/?(*.)+(spec|test).cjs" ] }J9 — Configuration object (1 repos): eliware/cfhub
{ "testEnvironment": "node", "testMatch": [ "**/?(*.)+(spec|test).mjs" ], "coveragePathIgnorePatterns": [ "/bin/", "/tests/live/" ], "testPathIgnorePatterns": [ "/node_modules/", "/tests/live/" ] }J10 — No package.json (6 repos): eliware/netdoc, eliware/compactor, eliware/glusterfs-repository, eliware/glusterfs-test-cluster, eliware/phpMyAdmin, eliware/rackpeek-config
J11 — Configuration object (1 repos): eliware/openai-balance
{ "testEnvironment": "node", "coveragePathIgnorePatterns": [ "/src/agent\\.mjs$", "/src/completion\\.mjs$", "/src/shell\\.mjs$", "/src/tool-shell\\.mjs$" ], "testMatch": [ "**/?(*.)+(spec|test).[jt]s?(x)", "**/?(*.)+(spec|test).mjs", "**/?(*.)+(spec|test).cjs" ] }J12 — Configuration object (1 repos): eliware/404
{ "testEnvironment": "node", "testMatch": [ "**/tests/**/*.test.mjs" ], "transform": {} }J13 — Configuration object (1 repos): eliware/knit
{ "testEnvironment": "node", "testMatch": [ "**/?(*.)+(spec|test).[jt]s?(x)", "**/?(*.)+(spec|test).mjs", "**/?(*.)+(spec|test).cjs" ], "setupFilesAfterEnv": [ "<rootDir>/tests/setup.mjs" ], "coverageReporters": [ "text", "json-summary" ] }J14 — Configuration object (1 repos): eliware/elera-lab
{ "testPathIgnorePatterns": [ "/new-tests/" ], "coveragePathIgnorePatterns": [ "/new-tests/" ] }J15 — Configuration object (2 repos): eliware/docs-web, eliware/nvc-web
{ "testEnvironment": "node", "testMatch": [ "**/?(*.)+(spec|test).[jt]s?(x)", "**/?(*.)+(spec|test).mjs", "**/?(*.)+(spec|test).cjs" ], "coveragePathIgnorePatterns": [ "/src/index\\.mjs$" ] }J16 — Configuration object (1 repos): eliware/mail
{ "testEnvironment": "node", "testMatch": [ "**/?(*.)+(spec|test).[jt]s?(x)", "**/?(*.)+(spec|test).mjs" ], "testPathIgnorePatterns": [ "<rootDir>/tests/ui.test.mjs" ] }J17 — Configuration object (1 repos): eliware/marginal
{ "testEnvironment": "node", "testMatch": [ "**/?(*.)+(spec|test).[jt]s?(x)", "**/?(*.)+(spec|test).mjs", "**/?(*.)+(spec|test).cjs" ], "coveragePathIgnorePatterns": [ "/node_modules/" ], "setupFiles": [ "<rootDir>/tests/setup.mjs" ] }J18 — Configuration object (1 repos): eliware/tasklit.com
{ "testEnvironment": "jsdom", "testMatch": [ "**/?(*.)+(spec|test).[jt]s?(x)", "**/?(*.)+(spec|test).mjs", "**/?(*.)+(spec|test).cjs" ], "roots": [ "<rootDir>/tests/jest" ], "collectCoverageFrom": [ "public/js/**/*.mjs", "!public/js/styles.mjs" ] }J19 — Configuration object (1 repos): eliware/discript
{ "setupFiles": [ "<rootDir>/tests/setup-env.mjs" ] }J20 — Configuration object (1 repos): eliware/gluster
{ "testEnvironment": "node", "testMatch": [ "**/?(*.)+(spec|test).[jt]s?(x)", "**/?(*.)+(spec|test).mjs", "**/?(*.)+(spec|test).cjs" ], "testPathIgnorePatterns": [ "/node_modules/", "/test/" ] }J21 — Configuration object (1 repos): eliware/glusterfs-packaging
{ "testEnvironment": "node", "testMatch": [ "**/?(*.)+(spec|test).[jt]s?(x)", "**/?(*.)+(spec|test).mjs", "**/?(*.)+(spec|test).cjs" ], "setupFiles": [ "<rootDir>/tests/setup.mjs" ] }J22 — Configuration object (1 repos): eliware/fc2s
{ "testEnvironment": "node", "coveragePathIgnorePatterns": [], "testMatch": [ "**/?(*.)+(spec|test).[jt]s?(x)", "**/?(*.)+(spec|test).mjs", "**/?(*.)+(spec|test).cjs" ] }J23 — Configuration object (1 repos): eliware/infrastructure-template
{ "testEnvironment": "node", "testMatch": [ "**/tests/**/*.test.mjs" ] }Prettier inventory
P1 — Configuration object (28 repos): eliware/test, eliware/documentation-template, eliware/docs, eliware/operations, eliware/workspace-template, eliware/ceo, eliware/coo, eliware/sysadmin, eliware/network, eliware/storage, eliware/dba, eliware/devops, eliware/gitops, eliware/sre, eliware/qa, eliware/marketing, eliware/library-template, eliware/redact, eliware/log, eliware/elid-client, eliware/codescope, eliware/agentx-cli, eliware/infrastructure-template, eliware/gitops-k8s, eliware/vyops-cfovh, eliware/vyops-core1, eliware/vyops-core2, eliware/vyops-test
{ "printWidth": 100, "tabWidth": 2, "useTabs": false, "semi": true, "singleQuote": false, "quoteProps": "as-needed", "jsxSingleQuote": false, "trailingComma": "all", "bracketSpacing": true, "bracketSameLine": false, "arrowParens": "always", "proseWrap": "preserve", "endOfLine": "lf" }P2 — No package.json ${label} property (64 repos): eliware/path, eliware/errors, eliware/signals, eliware/snowflake, eliware/common, eliware/discord, eliware/discord-webhook, eliware/elera-lib, eliware/elera-client, eliware/mcp-server, eliware/mcp-client, eliware/openai, eliware/openweathermap, eliware/rabbitmq, eliware/resampler, eliware/ssh-client, eliware/application-template, eliware/cli-template, eliware/web-template, eliware/discord-template, eliware/mcp-server-template, eliware/tagit, eliware/vyops, eliware/cfhub, eliware/openai-balance, eliware/translate, eliware/mcpli, eliware/404, eliware/knit, eliware/elera-server, eliware/elera-cli, eliware/elera-example, eliware/elera-lab, eliware/elid, eliware/docs-web, eliware/checkd, eliware/mail, eliware/mailbot, eliware/mailctl, eliware/ipfixd, eliware/ipfix, eliware/syslogd, eliware/eliware, eliware/node-test-private, eliware/node-test-public, eliware/dev-web, eliware/marginal, eliware/nvc-web, eliware/piano, eliware/sangah-landing, eliware/funnel, eliware/tasklit.com, eliware/ask, eliware/basement, eliware/discommand, eliware/discript, eliware/ttsbot, eliware/developer, eliware/puppeteer, eliware/gluster, eliware/gluster-http, eliware/glusterfs-packaging, eliware/fc2s, eliware/ra
P3 — Configuration object (1 repos): eliware/tasklist
{ "printWidth": 100, "tabWidth": 2, "useTabs": false, "semi": true, "singleQuote": false, "trailingComma": "all", "endOfLine": "lf" }P4 — No package.json (6 repos): eliware/netdoc, eliware/compactor, eliware/glusterfs-repository, eliware/glusterfs-test-cluster, eliware/phpMyAdmin, eliware/rackpeek-config
Standalone config files
- eliware/tagit —
.prettierrc.json
{ "singleQuote": true, "trailingComma": "all", "printWidth": 120 }- eliware/codescope —
.prettierrc.json
{ "singleQuote": false, "trailingComma": "all", "printWidth": 100, "tabWidth": 2, "semi": true }- eliware/elera-lab —
new-tests/jest.config.mjs
export default { rootDir: '..', testEnvironment: 'node', testMatch: ['<rootDir>/new-tests/jest/0[0-3]-*.test.mjs'], transform: {}, testSequencer: '<rootDir>/new-tests/jest-sequencer.mjs', verbose: false, // A suite is a serialized lab workflow; individual steps enforce their own // polling limits. Keep Jest from interrupting a legitimate recovery run. testTimeout: Number(process.env.ELERA_JEST_TIMEOUT_MS ?? 1_800_000), reporters: ['default'], };- eliware/ipfixd —
jest.config.mjs
export default { testEnvironment: 'node', testMatch: ['**/tests/**/*.test.mjs'], transform: {}, };- eliware/ipfix —
jest.config.mjs
export default { testEnvironment: 'node', testMatch: ['**/tests/**/*.test.mjs'], transform: {}, };Audit observations
- Jest varies considerably: 21 distinct declared objects, in addition to repos with no Jest property or no package.json. Common variation points include environment, test matching, coverage exclusions/collection/reporters, setup files, roots, transforms, and test sequencing/timeouts.
- The full standard Prettier object in eliware/test is present in 28 repos. 64 readable repos with package.json have no package.json Prettier property; one uses a reduced inline object, while the standalone files below add more variation.
- Standalone files: two .prettierrc.json files and three Jest config modules (including the nested lab config). codescope declares package.json Prettier and also has a .prettierrc.json, so both sources coexist there.
This is an inventory snapshot of default branches; it does not infer which differences are required one-off exceptions. The three empty mapped repos are left as follow-up gaps rather than treated as config-free.
- eliware/tagit —
Progress update — canonical Prettier configuration
- Added the approved 13-property Prettier object to
specs/conventions/general.yamlas the canonicalpackage.json.prettierconfiguration. - Updated rule
A-0.1.20.18to read that object from the convention, require an exact match inpackage.json, and reject standalone.prettierrc*andprettier.config*files anywhere in the repository. - Updated the mirrored tests to cover canonical settings and standalone config detection.
npm run formatpassed. The Jest/full validation suite has not been run.- Deleted the standalone config from the local CodeScope
maincheckout and committed it asa155553(Remove standalone Prettier config). Deleted the standalone config from the local TagItmaincheckout and committed it as56ce04ewith the same message. Those commits are local and were not pushed. Existing unrelated working changes in both checkouts were left untouched. - The two pull requests created by mistake were closed and their remote branches deleted; neither was merged.
- Added the approved 13-property Prettier object to
Repository config rollout
Using the local
eliware/docs/repo-map.yaml, I applied the canonicalpackage.json.prettierobject to all mapped local checkouts that had a package manifest. The existing 39 exact configs were left unchanged; 54 package manifests were corrected or updated, each in a separate local commit that contains onlypackage.json. Nine mapped repos withoutpackage.jsonwere skipped.Verification found all 93 mapped repos with package manifests now have the exact object, and each of the 54 new commits changes only
package.json. Changes are local and were not pushed. Theracheckout uses its defaultmasterbranch; the others were onmain. Existing unrelated worktree changes were preserved.Package manifest rollout
Added �[0m
package.jsonmanifests from the requested templates and customized package names/GitHub metadata for all nine repositories:- CLI:
netdoc(6e7901d),compactor(9278c19) - Application:
sangah-meta(299a4b6),glusterfs-test-cluster(2b98ea9),phpmyadmin(b4c5546) - Web:
sangah-requests(ebe9cc1) - Infrastructure:
glusterfs-repository(46575a8),netdoc-config(e2662ae),rackpeek-config(1fb241f)
Each local commit contains only
package.json. The four previously empty checkouts now have initial commits. Changes are on localmainbranches and were not pushed.- CLI:
Proposed golden Jest configuration
The proposed exact
package.json.jestobject is:{ "testEnvironment": "node", "testMatch": ["**/tests/**/*.test.mjs"], "collectCoverageFrom": ["src/**/*.mjs"], "coverageReporters": ["text", "json-summary"], "coverageThreshold": { "global": { "branches": 100, "functions": 100, "lines": 100, "statements": 100 } } }Make this object a general requirement in every repository's
package.json, including repositories that do not currently run Jest. Enforce exact object equality and keep standalone Jest configuration files prohibited. The settings remain inert unless Jest runs, while ensuring future tests start from the shared standard.Plan to finalize
- Add the golden object and universal requirement to the authoritative conventions.
- Update
eliware-testimplementation and mirrored tests to enforce the exact object and verify its behavior with focused tests. - Update applicable repository templates to carry the canonical object.
- Align every mapped repository's
package.jsonwith the golden object, preserving only any convention-approved migration details. - Run focused checks, then the full suite, and publish an updated inventory of the completed rollout.
The audit surfaced existing Jest configurations that differ in test environment, discovery, coverage scope, and setup. The rollout will need to resolve those differences as part of the migration; the proposed universal object intentionally leaves no permanent repository-specific Jest variants.
Current status — canonical Jest and Prettier enforcement
- Added the approved golden
package.json.jestobject, including the 100% global coverage thresholds, tospecs/conventions/general.yaml. - Rule
E-0.1.20.7now reads that object from the conventions file, enforces exact equality, and rejects standalone Jest config files. RuleA-0.1.20.18enforces the exact canonical Prettier object from conventions and rejects standalone Prettier configs. - Mirrored tests cover canonical equality and standalone config detection. The recent full
npm testpassed with 100% statements, branches, functions, and lines and zero lint warnings. - These changes are committed locally in
eliware/testasfab7bc6(Fix Jest progress and timing output). - The earlier audit and local package manifest rollouts are documented above. The canonical Prettier package rollout was verified across 93 repos with manifests. Nine manifests were added from templates, each in package.json-only local commits. Those repository commits remain local and were not pushed. Jest has not yet been rolled out across all mapped repositories or templates.
Remaining work
- Update applicable templates to include the golden Jest object.
- Align and verify
package.json.jestand standalone Jest config files across all mapped repositories, including the new manifests and the previously empty repositories. - Re-run the inventory and publish the completed rollout status here.
- Added the approved golden
package.json.eliwareauditI audited the 102 repositories in the local
eliware/docs/repo-map.yamlagainst their local checkouts (all were onmainormaster). All 102 had apackage.json.- 49 manifests had an
eliwareobject; 53 had noeliwareobject. - Of the 49 present objects, 39 contained only
apply, and 4 containedapplyplusexempt(the allowed shape). - Six objects had extra fields:
redact:capabilitiesopenai:authority,crosslinkstagit:authority,capabilities,crosslinkscodescope:environmentagentx-cli:authority,crosslinks404:authority,crosslinks
- All observed
applyandexemptvalues were arrays. Twoexemptarrays were empty; four contained the existing VyOS key-file exemptions. - A source/test search in those six repositories found no code reading the extra
eliwarefields. Thecodescope.environmentobject describes token sourcing and should be reviewed for migration to the proper configuration documentation/location before enforcement.
This is a local-checkout snapshot; it is not a fresh comparison against each GitHub default branch. The issue body now includes this workstream and requires
applyplus optionalexemptas the only permitted keys. The rollout must account for the 53 missing objects and move or remove the six extra-field cases before exact-key enforcement.- 49 manifests had an
Closing status
The shared convention and
eliware-testenforcement work is complete:- Canonical Jest and Prettier objects are defined in the conventions and checked for exact matches; standalone configuration files are rejected.
package.json.eliwareallows only requiredapplyand optionalexemptkeys. Unknown keys fail validation.- Mirrored tests cover the enforcement changes. The latest full
npm testpassed with 100% statements, branches, functions, and lines, zero lint warnings, and exit code 0. - Implementation commits in
eliware/test:fab7bc6(Jest/Prettier enforcement and timing changes) andefa9de0(restrict Eliware metadata keys).
Per direction, this issue is being closed at the shared-standard and enforcement scope. The mapped-repository rollout is not claimed complete: the audit found 53 local manifests without an
eliwareobject and six with additional keys, and the golden Jest object has not been aligned across all mapped repositories/templates. These migrations are deferred from this closure; the audit and exact findings are recorded in the comments above.
Goal Define one organization-wide gold standard for the
package.json.jestandpackage.json.prettiersections, with the same canonical objects across repositories wherever practical. Prefer exact object equality. Permit one-off differences only when an inventory shows a real repository or profile need, and scope each permitted difference narrowly so it cannot conflict with Eliware conventions oreliware-testenforcement. ## Audit before choosing the standard Inventory the current Jest and Prettier configuration for every active, non-fork Eliware repository with apackage.json, including repository templates. Inspect both package sections and any separate configuration files. Record repository, declared profile, present configuration, current validation result, and any behavior that appears to require a deviation. Do not assume the currenteliware/testconfiguration is automatically right for every profile. As an initial reference,eliware/testcurrently uses: - Jest:collectCoverageFrom: ["src/**/*.mjs"]andcoverageReporters: ["text", "json-summary"]. The harness supplies its own reporters; per-reporter option tuples are unsupported. - Prettier:printWidth: 100,tabWidth: 2,useTabs: false,semi: true,singleQuote: false,quoteProps: "as-needed",jsxSingleQuote: false,trailingComma: "all",bracketSpacing: true,bracketSameLine: false,arrowParens: "always",proseWrap: "preserve", andendOfLine: "lf". The audit should verify actual repository configuration and behavior before adopting or changing these baselines. ## Questions to resolve - Which Jest settings should be identical everywhere, and which settings are legitimately profile-specific (for example coverage scope, environment, transforms, module mapping, setup files, or test discovery)? - Should Jest configuration be required only when a repository uses Jest, or is there a supported reason to require ajestobject from every repository? - Should separate Jest and Prettier config files be prohibited consistently? The current checks reject separate Jest config files; a separate Prettier config file is not explicitly rejected by the configuration equality check. - Which Jest options are owned by theeliware-testwrapper and cannot be overridden, including coverage collection/results, reporters, configuration source, and focused test selection? - What is the narrowest exception model that lets repositories meet documented needs without weakening shared coverage, formatting, or validation guarantees? ## Acceptance criteria - Publish an inventory of current package sections and external config files, with repository profiles and evidence for every proposed exception. - Define the canonical Jest and Prettier objects in the authoritative shared conventions and update applicable templates to match. - Prefer exact equality for common settings; document each approved profile-specific or repository-specific exception, its owner, and the exact keys or values it may change. - Ensure allowed Jest variations cannot overrideeliware-test-owned behavior or violate the applicable profile's coverage and test requirements. - Enforce the chosen package-object and separate-file policies deterministically, with focused fixtures for the canonical case, each approved exception, and representative prohibited overrides. - Provide a migration sequence for existing repositories and identify any currently incompatible configuration before rollout.Additional scope: standardize
package.json.eliwareAudit the
eliwareobject in every mapped repository's package manifest and make its allowed shape uniform. It must containapplyand may containexempt; no other keys are allowed.applyremains the required explicit profile list.exempt, when present, must continue to follow the existing approval and validation rules. Move any repository-specific metadata or runtime configuration currently stored under othereliwarekeys to an appropriate documented location before enforcing the allow-list.Acceptance criteria:
package.json.eliwareobject, including missing objects, unknown keys, and malformedapply/exemptvalues.eliware-testvalidation and mirrored tests to reject keys other thanapplyand optionalexempt.