← Back to Skills Marketplace
charlie-morrison

Jest Config Validator

by charlie-morrison · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
110
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install jest-config-validator
Description
Validate jest.config.ts/js/json and Jest configuration in package.json for deprecated options, transform conflicts, and best practices. Use when validating J...
README (SKILL.md)

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+)

# Category Severity Rule
S1 Structure Error File not found or unreadable
S2 Structure Error Empty config or missing module.exports/export default
S3 Structure Warning Both jest.config and package.json#jest present (conflict)
S4 Structure Warning Unknown top-level config keys detected
S5 Structure Error Invalid JSON syntax (for .json configs)
T1 Test Environment Error Invalid testEnvironment value
T2 Test Environment Warning testEnvironment: jsdom without jest-environment-jsdom (Jest 28+)
T3 Test Environment Warning testURL deprecated in Jest 28+ (use testEnvironmentOptions)
T4 Test Environment Warning Empty testMatch or testPathPattern
X1 Transforms Warning Overlapping transform patterns (conflict)
X2 Transforms Warning ts-jest and babel-jest used together without clear separation
X3 Transforms Warning transformIgnorePatterns too broad (may skip needed transforms)
X4 Transforms Warning Missing transform for .tsx/.jsx when React detected
V1 Coverage Warning collectCoverageFrom empty or too broad
V2 Coverage Warning coverageThreshold set but collectCoverage not enabled
V3 Coverage Warning Deprecated coverageReporters values
D1 Deprecated Warning Deprecated Jest options detected
D2 Deprecated Warning jest.fn() used inside config file (configs should not mock)
D3 Deprecated Warning timers: 'fake' (old syntax, use fakeTimers object)
B1 Best Practices Info No clearMocks/resetMocks/restoreMocks set
B2 Best Practices Warning roots pointing outside project directory
B3 Best Practices Warning setupFiles/setupFilesAfterFramework path pattern issues
B4 Best Practices Info moduleNameMapper with complex regex missing comment
B5 Best Practices Warning preset and manual config overlap
B6 Best Practices Warning maxWorkers 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

Code Meaning
0 No errors found (warnings/info may exist)
1 One or more errors found
2 File not found or parse error
Usage Guidance
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.
Capability Analysis
Type: OpenClaw Skill Name: jest-config-validator Version: 1.0.0 The skill bundle provides a legitimate utility for validating Jest configuration files (JS, TS, JSON, and package.json). The core logic in scripts/jest_config_validator.py uses regex-based parsing and standard JSON processing to check for deprecated options, transform conflicts, and best practices without executing the configuration files or making network calls. No indicators of data exfiltration, malicious execution, or prompt injection were found.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install jest-config-validator
  3. After installation, invoke the skill by name or use /jest-config-validator
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: 25 rules for jest.config validation
Metadata
Slug jest-config-validator
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Jest Config Validator?

Validate jest.config.ts/js/json and Jest configuration in package.json for deprecated options, transform conflicts, and best practices. Use when validating J... It is an AI Agent Skill for Claude Code / OpenClaw, with 110 downloads so far.

How do I install Jest Config Validator?

Run "/install jest-config-validator" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Jest Config Validator free?

Yes, Jest Config Validator is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Jest Config Validator support?

Jest Config Validator is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Jest Config Validator?

It is built and maintained by charlie-morrison (@charlie-morrison); the current version is v1.0.0.

💬 Comments