Jest Config Validator

v1.0.0

Validate jest.config.ts/js/json and Jest configuration in package.json for deprecated options, transform conflicts, and best practices. Use when validating J...

0· 91·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for charlie-morrison/jest-config-validator.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Jest Config Validator" (charlie-morrison/jest-config-validator) from ClawHub.
Skill page: https://clawhub.ai/charlie-morrison/jest-config-validator
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Canonical install target

openclaw skills install charlie-morrison/jest-config-validator

ClawHub CLI

Package manager switcher

npx clawhub@latest install jest-config-validator
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the included script and SKILL.md: the tool analyzes jest.config.* and package.json#jest for deprecated options, transforms, coverage, and best practices. No unrelated binaries, env vars, or platform-level access are requested.
Instruction Scope
Runtime instructions and the script focus on reading and analyzing local Jest config files (jest.config.js/ts/json and package.json). The actions (file reads, regex parsing, producing text/json/summary output) are within the stated purpose. Note: the script performs approximate JS/TS parsing with regexes, so it may produce false positives/negatives for complex configs.
Install Mechanism
No install spec; the skill is instruction-only with an included Python script. Nothing is downloaded from external URLs or written to system-wide locations by an installer.
Credentials
No environment variables, credentials, or config paths are required. The script only reads files the user points it to or that it discovers in the project directory.
Persistence & Privilege
The skill is not always-enabled and does not request system-wide persistence or modify other skills. Autonomous invocation is possible (platform default) but does not appear to expand privileges or access secrets.
Assessment
This skill appears to be what it says—a local Jest config validator. Before installing or running: (1) review the included scripts if you will run them in sensitive repositories (the tool reads files you point it at and uses regex-based parsing, which can misreport complex JS/TS configs); (2) run it on a non-production checkout or in a sandbox if you are concerned about false positives or unexpected behavior; and (3) note it does not require network access or credentials, so risks are low. If you need stronger parsing (accurate AST-level JS/TS analysis), consider tools that use a JS parser rather than approximate regex-based checks.

Like a lobster shell, security has layers — review code before you run it.

latestvk971eqvnnzmn4k7zjywqx2st1n858k12
91downloads
0stars
1versions
Updated 6d ago
v1.0.0
MIT-0

Jest Config Validator

Validate jest.config.ts, jest.config.js, jest.config.json, and package.json#jest for deprecated options, transform conflicts, coverage misconfigurations, and best practices. Supports text, JSON, and summary output formats with CI-friendly exit codes.

Commands

# Full validation (all 22+ rules)
python3 scripts/jest_config_validator.py validate jest.config.js

# Quick syntax-only check (structure rules only)
python3 scripts/jest_config_validator.py check jest.config.ts

# Explain config in human-readable form
python3 scripts/jest_config_validator.py explain jest.config.json

# Suggest improvements
python3 scripts/jest_config_validator.py suggest package.json

# JSON output (CI-friendly)
python3 scripts/jest_config_validator.py validate jest.config.js --format json

# Summary only (pass/fail + counts)
python3 scripts/jest_config_validator.py validate jest.config.js --format summary

# Strict mode (warnings become errors)
python3 scripts/jest_config_validator.py validate jest.config.js --strict

Rules (22+)

#CategorySeverityRule
S1StructureErrorFile not found or unreadable
S2StructureErrorEmpty config or missing module.exports/export default
S3StructureWarningBoth jest.config and package.json#jest present (conflict)
S4StructureWarningUnknown top-level config keys detected
S5StructureErrorInvalid JSON syntax (for .json configs)
T1Test EnvironmentErrorInvalid testEnvironment value
T2Test EnvironmentWarningtestEnvironment: jsdom without jest-environment-jsdom (Jest 28+)
T3Test EnvironmentWarningtestURL deprecated in Jest 28+ (use testEnvironmentOptions)
T4Test EnvironmentWarningEmpty testMatch or testPathPattern
X1TransformsWarningOverlapping transform patterns (conflict)
X2TransformsWarningts-jest and babel-jest used together without clear separation
X3TransformsWarningtransformIgnorePatterns too broad (may skip needed transforms)
X4TransformsWarningMissing transform for .tsx/.jsx when React detected
V1CoverageWarningcollectCoverageFrom empty or too broad
V2CoverageWarningcoverageThreshold set but collectCoverage not enabled
V3CoverageWarningDeprecated coverageReporters values
D1DeprecatedWarningDeprecated Jest options detected
D2DeprecatedWarningjest.fn() used inside config file (configs should not mock)
D3DeprecatedWarningtimers: 'fake' (old syntax, use fakeTimers object)
B1Best PracticesInfoNo clearMocks/resetMocks/restoreMocks set
B2Best PracticesWarningroots pointing outside project directory
B3Best PracticesWarningsetupFiles/setupFilesAfterFramework path pattern issues
B4Best PracticesInfomoduleNameMapper with complex regex missing comment
B5Best PracticesWarningpreset and manual config overlap
B6Best PracticesWarningmaxWorkers set to 1 in non-CI context

Output Formats

text (default): Human-readable with file path, rule code, severity, and message per finding.

json: Machine-readable JSON with file, summary, and findings array. Each finding has rule, severity, message, and line fields.

summary: One-line pass/fail with error/warning/info counts. Ideal for CI output gates.

Exit Codes

CodeMeaning
0No errors found (warnings/info may exist)
1One or more errors found
2File not found or parse error

Comments

Loading comments...