es5-compliance

Convert ES6+ JavaScript syntax to ES5 for ServiceNow Rhino engine.

77|23|Updated Jul 16, 2025
One-click install
npx skills add https://github.com/groeimetai/snow-flow --skill es5-compliance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: es5-compliance
Source: https://github.com/groeimetai/snow-flow/tree/main/packages/opencode/src/bundled-skills/es5-compliance
Command: npx skills add https://github.com/groeimetai/snow-flow --skill es5-compliance

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the critical issue of JavaScript syntax errors in ServiceNow server-side scripts by enforcing ES5 compliance, preventing deployment failures and runtime exceptions.

Core Features & Use Cases

  • ES5 Syntax Enforcement: Automatically identifies and helps convert modern JavaScript (ES6+) syntax to the ES5 standard required by ServiceNow's Rhino engine.
  • Error Prevention: Avoids SyntaxError by ensuring all server-side scripts adhere to the older JavaScript standard.
  • Use Case: When writing a new Business Rule or Script Include, use this Skill to review your code and automatically convert any const, let, arrow functions, or template literals into their ES5 equivalents.

Quick Start

Use the es5-compliance skill to convert the provided JavaScript code to ES5 syntax.

Frequently Asked Questions about es5-compliance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my ServiceNow server-side script throw a syntax error?

ServiceNow server-side scripts throw syntax errors when using ES6+ features because the Rhino engine requires ES5 compliance, meaning modern syntax like const, let, arrow functions, and template literals must be converted to their ES5 equivalents.

How do I convert modern JavaScript to ES5 for ServiceNow?

To convert modern JavaScript to ES5 for ServiceNow, use a compliance tool to automatically identify ES6+ syntax and replace const, let, arrow functions, and template literals with their ES5 alternatives, ensuring Rhino engine compatibility.

Does ServiceNow support ES6 JavaScript in server-side scripts?

ServiceNow does not support ES6 JavaScript in server-side scripts because the platform uses the Mozilla Rhino engine, which strictly requires ES5 compliance to prevent deployment failures and runtime exceptions.

What JavaScript syntax causes runtime exceptions in ServiceNow?

ES6+ JavaScript syntax causes runtime exceptions in ServiceNow, specifically const declarations, let declarations, arrow functions, and template literals, which must be converted to ES5 syntax to ensure compatibility with the Rhino engine.

When do I need ES5 compliance for ServiceNow Business Rules?

You need ES5 compliance for ServiceNow Business Rules whenever writing new server-side scripts, as using modern ES6+ syntax without converting to ES5 alternatives will trigger SyntaxError exceptions and prevent successful deployment.

Can I use arrow functions in ServiceNow Script Includes?

You cannot use arrow functions in ServiceNow Script Includes because the Rhino engine requires ES5 compliance, meaning arrow functions must be converted to traditional function expressions to avoid syntax errors.