Analyze JavaScript Quality Actions (Preview)

Analyze JavaScript Quality actions perform a quality analysis for the JavaScript code associated with a BSP Application page, using either the default rules provided by ESLint or a custom configuration. The action requires that both Node.js and ESLint are installed on the LiveCompare server, as described here.

The quality analysis uses either the default .eslintrc.json configuration file from the Node.js installation directory, or a custom configuration provided in the action’s Configuration property. The results are stored in a Code Quality dataset, and two Table datasets.

Action Property Description
Code Quality Analysis A Code Quality dataset which stores the results of the analysis.
Configuration A String Multiline parameter which should be set to store the contents of a custom ESLint json configuration file to be used for the analysis, in place of the default configuration file. The configuration settings should be stored as a single string entry.
Object Name A String parameter or dataset which stores the name of the BSP Application object to analyze.
Page A String parameter or dataset which stores the name of a page contained within the specified BSP Application.
RFC Destination An RFC Destination parameter or dataset referring to the system from which to retrieve the BSP Application page to be analyzed.
Rule Break Detail A Table dataset which stores the quality rules that were triggered by the specified BSP Application page.
Script Output A Table dataset which stores the output from the ESLint program.

The Rule Break Detail table has the following columns:

Column Description
TYPE The type of the object analyzed. This column is set to WAPA_PAGE.
NAME The name of the BSP Application in which a rule violation occurred.
PAGE The name of the BSP Application page in which a rule violation occurred.
CLASS The class of the violated rule, either ‘error’ or ‘warning’.
RULE The name of the violated rule.
RULE_ID The identifier associated with the violated rule.
LINE_NUMBER The line number in the BSP Application page’s JavaScript code in which the rule violation occurred.
SOURCE This column is not used.

The Script Output dataset has the following column:

Column Description
LINE A line of code analysis output returned by the ESLint program. The first populated row in this column stores the path of a temporary file on the LiveCompare server where the script output is stored.

Example:

Analyze JavaScript Quality action example.

Getting Started with ESLint

Configuring ESLint

ESLint Rules


Was this information helpful?

Tricentis LiveCompare Manual 4.1 © Tricentis US Corp.