testing-js

Richtlinien zur Überprüfung von JavaScript-Dateien auf Syntaxfehler

npx skills add https://github.com/automattic/data-liberation-agent --skill testing-js

When to use me

Use this skill when validating JavaScript files for syntax errors. Do not use this skill for PHP validation.

Step 1: Identify JavaScript files

Find all JS files in the project, excluding node_modules/, build/, and dist/ directories:

find . -name "*.js" -not -path "*/node_modules/*" -not -path "*/build/*" -not -path "*/dist/*"

Step 2: Check syntax

Use Node to check each JS file for syntax errors:

node --check <file>
  • A file with valid syntax exits 0 with no output.
  • A file with syntax errors prints the error with line number and exits non-zero.
  • Fix any syntax errors found by editing the file, then re-check.

Rules

  • Syntax only: This skill checks for JavaScript syntax errors. Do not run ESLint or other coding standard tools.
  • Max 3 cycles: Run at most 3 fix-then-retest cycles per file. If issues remain after 3 cycles, report them as unresolved.
  • Never modify business logic: Only fix syntax errors. Do not change how the code works.
  • Report format: After testing, report results as:
    • PASS: No syntax errors
    • FAIL: List remaining errors with file, line, and message

Mehr Skills von automattic

wp-phpstan
automattic
Verwenden beim Konfigurieren, Ausführen oder Beheben von PHPStan-Statikanalysen in WordPress-Projekten (Plugins/Themes/Websites): phpstan.neon-Setup, Baselines,…
official
wp-playground
automattic
Für WordPress Playground-Workflows: schnelle, wegwerfbare WP-Instanzen im Browser oder lokal über @wp-playground/cli (server, run-blueprint, build-snapshot),…
official
wp-plugin-development
automattic
Verwenden bei der Entwicklung von WordPress-Plugins: Architektur und Hooks, Aktivierung/Deaktivierung/Deinstallation, Admin-UI und Settings API, Datenspeicherung, Cron/Aufgaben, Sicherheit…
official
wp-project-triage
automattic
Verwenden Sie, wenn Sie eine deterministische Inspektion eines WordPress-Repositorys (Plugin/Theme/Block-Theme/WP-Core/Gutenberg/Full-Site) benötigen, einschließlich Tooling/Tests/Version…
official
wp-rest-api
automattic
Verwenden beim Erstellen, Erweitern oder Debuggen von WordPress-REST-API-Endpunkten/-Routen: register_rest_route, WP_REST_Controller/Controller-Klassen, Schema/Argumente…
official
wp-wpcli-and-ops
automattic
Verwenden bei der Arbeit mit WP-CLI (wp) für WordPress-Operationen: sicheres Suchen/Ersetzen, DB-Export/Import, Plugin/Theme/Benutzer/Inhaltsverwaltung, Cron, Cache leeren,…
official
wpds
automattic
Verwenden beim Erstellen von Benutzeroberflächen, die das WordPress Design System (WPDS) und dessen Komponenten, Tokens, Patterns usw. nutzen.
official
woocommerce-finalize
automattic
Vorab-Code-Gesundheits- und Rückverfolgbarkeitsaudit für WooCommerce-Plugins. Wird nach der Code-Überprüfung ausgeführt – konzentriert sich auf toten Code, Duplikate, strukturelle Komplexität und…
official