Skip to content

Testing mode#2443

Merged
Crabcyborg merged 115 commits into
masterfrom
testing_mode
Oct 9, 2025
Merged

Testing mode#2443
Crabcyborg merged 115 commits into
masterfrom
testing_mode

Conversation

@Crabcyborg
Copy link
Copy Markdown
Contributor

@Crabcyborg Crabcyborg commented Jul 29, 2025

@Crabcyborg Crabcyborg modified the milestone: 6.23 Jul 30, 2025
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (4)
css/frm_testing_mode.css (3)

1-1: The missing comma issue persists in the compiled CSS.

The selector .frm_wrap input[type=email] .frm_wrap input[type=search] still has a space instead of a comma, despite being marked as addressed. This prevents styles from applying to search inputs.

Note: This is compiled CSS. The fix should be applied in the source SCSS file resources/scss/test-mode/frm_testing_mode.scss and then recompiled.


3-3: Bootstrap tooltip CSS contains duplicate property declarations.

The .tooltip rule has duplicate text-align declarations (text-align:left followed by text-align:start), and #frm_testmode_upgrade has duplicate border-radius declarations. These are maintenance issues in the compiled CSS.

Note: This is compiled CSS from Bootstrap v4.6.1. If you're importing Bootstrap tooltips, consider whether you need the full block or can use a more targeted import to reduce file size and avoid these duplicates.


1-3: Focus outline removal remains an accessibility blocker (already flagged).

Multiple rules throughout the file set outline:none or outline:0 on :focus states, often with !important. This breaks keyboard navigation accessibility.

The comprehensive fix with :focus-visible was already suggested in previous review comments. This must be addressed before release, as it's a WCAG violation that blocks keyboard users from completing forms.

resources/scss/test-mode/frm_testing_mode.scss (1)

123-140: Background shorthand overrides background-color (already flagged).

Line 138's background: transparent url(...) shorthand resets the background-color: #fff set on line 135, making the select background transparent instead of white. This is a known CSS gotcha.

Apply the fix suggested in the previous review: split the shorthand into explicit longhand properties (background-image, background-repeat, background-position) to preserve the white background.

🧹 Nitpick comments (5)
resources/scss/test-mode/frm_testing_mode.scss (2)

142-144: Focus state removes background, reducing visual feedback.

Setting background-color: transparent !important on focus removes any background color distinction. Combined with the background shorthand issue (line 138 already makes it transparent), this provides no visual change on focus beyond the border color change defined elsewhere.

Consider whether the select needs a distinct background color on focus for better visual feedback, or if the border color change alone is sufficient. If transparent background is intentional, this rule is redundant with line 138's effect.


277-300: LGTM - Responsive design for mobile viewports.

The mobile breakpoint at 1024px appropriately stacks controls vertically and adjusts spacing. The duplicate rule at lines 278-282 and 284-286 could be consolidated, but it's a minor nitpick.

Optional: Consolidate the duplicate selector at lines 278-282 and 284-286:

#frm_testing_mode > div > label:not(#frm_quick_jump_label) {
    width: 100%;
    display: block !important;
    margin-left: 0 !important;
    margin-top: var(--gap-sm);
}
classes/views/test-mode/container.php (3)

12-44: Consider moving inline style to CSS class.

Line 14 uses inline style="display: flex;" which is already defined in the SCSS at line 257 (.frm_warning_style:has(.frm-addon-button)). However, the :has() selector may not match this exact structure.

If the existing CSS class .frm_warning_style:has(.frm-addon-button) at resources/scss/test-mode/frm_testing_mode.scss:256-260 doesn't match this structure, either:

  1. Update the CSS selector to match this markup, or
  2. Add a specific class like frm-warning-with-button to avoid inline styles

Otherwise, the warning panel logic is sound with proper escaping and i18n.


95-105: Pagination logic is safe but could handle edge cases more explicitly.

The pagination rendering correctly:

  • Checks if $pagination is callable before invoking it
  • Falls back to including the pagination-buttons view when $pagination === false

However, if $pagination is neither callable nor false (e.g., null, true, or a string), no pagination is rendered. This might be intentional, but consider adding an else clause or comment to clarify expected behavior.


107-122: Action buttons are well-structured with minor alt text duplication.

The buttons are properly implemented:

  • Conditional disabled state using the frm_noallow class
  • Extensible via the frm_testmode_start_over_button_attrs filter
  • Proper output escaping for URLs and text

Minor note: Line 120's alt text duplicates the visible button text. For decorative images that are next to text, alt="" would be more appropriate per WCAG guidelines, since the visible text already conveys the purpose.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4065edf and 4a4f953.

📒 Files selected for processing (3)
  • classes/views/test-mode/container.php (1 hunks)
  • css/frm_testing_mode.css (1 hunks)
  • resources/scss/test-mode/frm_testing_mode.scss (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
classes/views/test-mode/container.php (4)
classes/helpers/FrmAppHelper.php (6)
  • FrmAppHelper (6-4617)
  • array_to_html_params (1367-1376)
  • simple_get (703-712)
  • tooltip_icon (4523-4535)
  • admin_upgrade_link (121-162)
  • icon_by_class (1227-1264)
classes/controllers/FrmAddonsController.php (1)
  • FrmAddonsController (6-1513)
classes/helpers/FrmHtmlHelper.php (2)
  • FrmHtmlHelper (9-129)
  • echo_dropdown_option (50-57)
classes/controllers/FrmTestModeController.php (1)
  • should_show_upsell (206-212)
🪛 Biome (2.1.2)
css/frm_testing_mode.css

[error] 3-3: Unexpected shorthand property background after background-color

(lint/suspicious/noShorthandPropertyOverrides)


[error] 3-3: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

text-align is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)


[error] 3-3: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

border-radius is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Cypress
  • GitHub Check: PHP 8 tests in WP trunk
  • GitHub Check: PHP 7.4 tests in WP trunk
  • GitHub Check: Run PHP Syntax inspection (8.3)
🔇 Additional comments (14)
resources/scss/test-mode/frm_testing_mode.scss (9)

1-31: LGTM - Well-organized SCSS imports with clear documentation.

The import structure logically groups related components and includes helpful comments explaining dependencies. The imports align with the UI components used in the test mode container view.


33-38: LGTM - SVG icon base styles.

The .frmsvg base styles correctly use currentColor for theme flexibility and set appropriate default dimensions.


40-51: LGTM - Standard modal overlay implementation.

The overlay styling for the preview page uses standard fixed positioning and semi-transparent background, appropriate for modal/preview contexts.


175-184: LGTM - Consistent button hover states across test mode UI.

The shared hover styles for secondary buttons provide consistent interaction feedback.


186-207: LGTM - Pagination button styles with clear active state.

The pagination buttons have appropriate sizing, spacing, and a distinct active page indicator using the primary color.


209-225: LGTM - Start-over button positioned for easy access.

Absolute positioning in the top-right provides consistent placement without disrupting the flow of other controls.


227-235: LGTM - Disabled state and container sizing.

The .frm_noallow opacity and form actions container max-width are appropriate for the UI constraints.


237-254: LGTM - Upgrade bar with well-documented negative margin technique.

The negative margins elegantly extend the upgrade bar to the card edges. The comment clearly explains the technique.


256-275: LGTM - Warning and modal link styles.

The flexbox adjustment for warnings with action buttons and link text-decoration removal are appropriate for the UI.

classes/views/test-mode/container.php (5)

1-10: LGTM - Standard WordPress security check.

The ABSPATH check correctly prevents direct file access, following WordPress security best practices.


46-51: LGTM - Container heading and toggle controls.

The heading and toggle controls are properly structured. The toggles use the helper function which handles rendering and escaping.


53-73: LGTM - Role dropdown with proper disabled state.

The role dropdown correctly:

  • Conditionally renders based on available roles
  • Uses strict comparison for selected state
  • Properly disables when test mode is not enabled
  • Escapes output through the helper function

The simple_get call on line 54 will return an empty string if the parameter is not set (based on the helper signature), which is appropriate for the ternary logic.


75-93: LGTM - Form actions multiselect with accessibility support.

The form actions multiselect:

  • Includes a tooltip explaining the functionality
  • Properly disables when test mode is not enabled
  • Uses strict comparison in in_array for the selected state
  • Correctly escapes and sanitizes all output (esc_attr, esc_html, absint)

123-128: LGTM - Upgrade upsell with proper accessibility.

The conditional upgrade link:

  • Only renders when appropriate
  • Uses the upgrade link helper for consistent UTM tracking
  • Properly marks the icon as decorative with aria-hidden="true"
  • Correctly escapes all output

… logic into test mode plugin, put enabled form actions behind a filter
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
classes/controllers/FrmTestModeController.php (1)

126-133: Switch to wp_json_encode for data attributes.

Please use wp_json_encode() instead of json_encode() before handing the values to array_to_html_params so we stay consistent with core encoding (UTF-8, big-int safety). Applies to both addon data attributes here.

-			$ai_install_span_attrs['data-oneclick'] = json_encode( $oneclick_data );
+			$ai_install_span_attrs['data-oneclick'] = wp_json_encode( $oneclick_data );-			$test_mode_install_span_attrs['data-oneclick'] = json_encode( $oneclick_data );
+			$test_mode_install_span_attrs['data-oneclick'] = wp_json_encode( $oneclick_data );
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4a4f953 and eed2318.

📒 Files selected for processing (2)
  • classes/controllers/FrmTestModeController.php (1 hunks)
  • classes/views/test-mode/container.php (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
classes/controllers/FrmTestModeController.php (4)
classes/helpers/FrmAppHelper.php (6)
  • current_user_can (2078-2100)
  • FrmAppHelper (6-4617)
  • simple_get (703-712)
  • clip (1387-1401)
  • get_post_param (682-692)
  • pro_is_installed (307-309)
classes/models/FrmForm.php (4)
  • FrmForm (6-1277)
  • getOne (788-821)
  • get_id_by_key (748-750)
  • get_key_by_id (759-769)
classes/controllers/FrmAddonsController.php (2)
  • FrmAddonsController (6-1513)
  • install_link (658-690)
classes/controllers/FrmAppController.php (3)
  • FrmAppController (6-1565)
  • enqueue_dialog_assets (426-429)
  • upgrade_overlay_html (436-448)
classes/views/test-mode/container.php (4)
classes/helpers/FrmAppHelper.php (5)
  • FrmAppHelper (6-4617)
  • array_to_html_params (1367-1376)
  • tooltip_icon (4523-4535)
  • admin_upgrade_link (121-162)
  • icon_by_class (1227-1264)
classes/controllers/FrmAddonsController.php (1)
  • FrmAddonsController (6-1513)
classes/helpers/FrmHtmlHelper.php (2)
  • FrmHtmlHelper (9-129)
  • echo_dropdown_option (50-57)
classes/controllers/FrmTestModeController.php (1)
  • should_show_upsell (201-207)
🪛 PHPMD (2.15.0)
classes/controllers/FrmTestModeController.php

98-98: Avoid unused local variables such as '$roles'. (undefined)

(UnusedLocalVariable)


99-99: Avoid unused local variables such as '$selected_role'. (undefined)

(UnusedLocalVariable)


100-100: Avoid unused local variables such as '$pagination'. (undefined)

(UnusedLocalVariable)


101-101: Avoid unused local variables such as '$disabled_required_fields_toggle_args'. (undefined)

(UnusedLocalVariable)


102-102: Avoid unused local variables such as '$show_all_hidden_fields_toggle_args'. (undefined)

(UnusedLocalVariable)


107-107: Avoid unused local variables such as '$should_show_warning'. (undefined)

(UnusedLocalVariable)


109-109: Avoid unused local variables such as '$enabled_form_actions'. (undefined)

(UnusedLocalVariable)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Cypress
  • GitHub Check: Psalm
  • GitHub Check: PHP 8 tests in WP trunk
  • GitHub Check: Run PHP Syntax inspection (8.3)
  • GitHub Check: PHP 7.4 tests in WP trunk
  • GitHub Check: PHPStan

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eed2318 and 1f8c6fc.

📒 Files selected for processing (1)
  • classes/controllers/FrmTestModeController.php (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
classes/controllers/FrmTestModeController.php (5)
classes/helpers/FrmAppHelper.php (6)
  • current_user_can (2078-2100)
  • FrmAppHelper (6-4617)
  • simple_get (703-712)
  • clip (1387-1401)
  • get_post_param (682-692)
  • pro_is_installed (307-309)
classes/models/FrmForm.php (4)
  • FrmForm (6-1277)
  • getOne (788-821)
  • get_id_by_key (748-750)
  • get_key_by_id (759-769)
classes/models/FrmFormAction.php (1)
  • get_action_for_form (535-583)
classes/controllers/FrmAddonsController.php (2)
  • FrmAddonsController (6-1513)
  • install_link (658-690)
classes/controllers/FrmAppController.php (3)
  • FrmAppController (6-1565)
  • enqueue_dialog_assets (426-429)
  • upgrade_overlay_html (436-448)
🪛 PHPMD (2.15.0)
classes/controllers/FrmTestModeController.php

98-98: Avoid unused local variables such as '$roles'. (undefined)

(UnusedLocalVariable)


99-99: Avoid unused local variables such as '$selected_role'. (undefined)

(UnusedLocalVariable)


100-100: Avoid unused local variables such as '$pagination'. (undefined)

(UnusedLocalVariable)


101-101: Avoid unused local variables such as '$disabled_required_fields_toggle_args'. (undefined)

(UnusedLocalVariable)


102-102: Avoid unused local variables such as '$show_all_hidden_fields_toggle_args'. (undefined)

(UnusedLocalVariable)


107-107: Avoid unused local variables such as '$should_show_warning'. (undefined)

(UnusedLocalVariable)


109-109: Avoid unused local variables such as '$enabled_form_actions'. (undefined)

(UnusedLocalVariable)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: PHP 8 tests in WP trunk
  • GitHub Check: PHP 7.4 tests in WP trunk
  • GitHub Check: Cypress
🔇 Additional comments (4)
classes/controllers/FrmTestModeController.php (4)

1-9: LGTM!

The file structure, security check, and class declaration follow WordPress and plugin conventions correctly.


44-55: LGTM!

The capability check and filter pattern correctly gate test mode visibility, and input sanitization is handled by FrmAppHelper::simple_get().


79-138: LGTM!

The rendering logic correctly validates the form, handles conversational forms gracefully, prepares view data, and safely includes the template. The static analysis warnings about unused variables at lines 98-109 are false positives—these variables are consumed by the included view template at line 137.


140-295: LGTM!

All helper methods use appropriate patterns: safe delegation, correct filtering, proper role handling, and sensible defaults for addon integration. The methods correctly prepare data for the test mode UI and allow external control via filters.

Comment thread classes/controllers/FrmTestModeController.php
Comment thread classes/controllers/FrmTestModeController.php
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (4)
css/frm_testing_mode.css (4)

1-1: Restore search input selector

Line 1 still chains .frm_wrap input[type=email] .frm_wrap input[type=search], so search inputs never match this rule and miss the intended styling. Split the selectors with a comma.

-.frm_wrap input[type=tel],.frm_wrap input[type=text],.frm_wrap input[type=email] .frm_wrap input[type=search],.frm_wrap input[type=number],
+.frm_wrap input[type=tel],.frm_wrap input[type=text],.frm_wrap input[type=email],.frm_wrap input[type=search],.frm_wrap input[type=number],

3-3: Remove duplicate text-align in .tooltip

.tooltip sets both text-align:left and text-align:start; the first is dead code and keeps tripping the linter. Drop the redundant declaration.

-.tooltip{...;text-align:left;text-align:start;...}
+.tooltip{...;text-align:start;...}

3-3: Clean up duplicate border-radius

#frm_testmode_upgrade declares border-radius twice. Remove the first value so the intended 0 0 16px 16px is the only one left and the linter passes.

-#frm_testmode_upgrade{border-radius:16px;...;border-radius:0 0 16px 16px}
+#frm_testmode_upgrade{...;border-radius:0 0 16px 16px}

1-1: Reinstate visible keyboard focus styles

Multiple selectors on Line 1 force outline:none !important without any replacement, so keyboard users lose focus indication—an accessibility blocker. Add a :focus-visible treatment before suppressing outlines for pointer focus.

+.frm-white-body .button:focus-visible,
+.frm-white-body .frm-button-primary:focus-visible,
+.frm-white-body .frm-button-secondary:focus-visible,
+.frm-white-body .frm-button-tertiary:focus-visible,
+#frm-form-button .frm_button_submit:focus-visible {
+  outline:2px solid var(--primary-500) !important;
+  outline-offset:2px;
+  box-shadow:none !important;
+}
+.frm-white-body .button:focus:not(:focus-visible),
+#frm-form-button .frm_button_submit:focus:not(:focus-visible) {
+  outline:none !important;
+}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 958fa71 and 0f89530.

📒 Files selected for processing (2)
  • css/frm_testing_mode.css (1 hunks)
  • resources/scss/test-mode/frm_testing_mode.scss (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • resources/scss/test-mode/frm_testing_mode.scss
🧰 Additional context used
🪛 Biome (2.1.2)
css/frm_testing_mode.css

[error] 3-3: Unexpected shorthand property background after background-color

(lint/suspicious/noShorthandPropertyOverrides)


[error] 3-3: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

text-align is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)


[error] 3-3: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

border-radius is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Cypress
  • GitHub Check: PHP 8 tests in WP trunk
  • GitHub Check: PHP 7.4 tests in WP trunk
  • GitHub Check: Run PHP Syntax inspection (8.3)

Comment thread css/frm_testing_mode.css Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (5)
js/src/admin/upgrade-popup.js (3)

29-90: ...


For injection comment line range 66-71.

For lockIcon comment lines 199-216.

For button comment lines 226-241 (with duplicate tag). also include guard for `.frm_are_not_installed` etc? Should mention.

But we must ensure we don't raise multiple separate exposures for same block if possible.

Also degrade on `showLink`, `addonStatus`, `button` etc.

Focus comment 1 emphasising missing null checks for `button` etc.

But we must mention `showLink` for `getShowLinkHrefValue` needed. If showLink null, `getShowLinkHrefValue` requires showLink (calls `showLink.getAttribute`). Without guard, there is earlier in `getShowLinkHrefValue` - if showLink null, TypeError. Should mention in comment? maybe aggregator: when container lacks `.frm-upgrade-link`, showLink is null and `container.querySelector` returns null; `getShowLinkHrefValue` called with null - inside, call `showLink.getAttribute`, causing crash. So we need to guard at container fetch step; ensure `showLink` found before use.

Hence comment 1: "Need to guard DOM nodes retrieved from `container.querySelector` before dereferencing. Without them, calling `.className`, `.getAttribute` etc will throw."

Proposed diff: assign to constant, check `if (!button || !upgradeMessage || !showLink || !addonStatus) { return; }` etc. For `getShowLinkHrefValue`, we may adjust to accept null.

Maybe restructure: after query selectors, check for essential nodes. Provide diff.

Also mention intangible `JSON.parse`? impetus.

Ok.

Construct diff example:

if ( ! oneclickMessage || ! upgradeMessage || ! showLink || ! button || ! addonStatus ) {
console.warn('upgrade modal missing expected nodes');
return;
}


But `oneclickMessage` optional? They check for null. So we don't include oneclick message.

Also `getShowLinkHrefValue` should bail if showLink missing.

Hence comment.

Now comment 2: injection.

Proposed diff: set `upgradeMessage.innerHTML` first and then fill text.

But also guard `upgradeMessage` from previous comment? If we ensure `upgradeMessage` exist, we can rely.

Ok.

Next comment on `lockIcon`. Provide diff.

Another comment for `modal.querySelector( '.frm_are_not_installed' )` etc? Should guard or degrade.

But there is interplay with previous comment? I can mention along with button comment.

Maybe produce comment 4 combining hooking.

But ensure each comment assigned to line range.

Also - hooking lines 226 etc.

Now, after finishing comment, update scratchpad.

Then move to next file.

Need to check addon-state.js.

Observations:

- At top, `const ajaxurl = window.ajaxurl ?? frm_js.ajax_url;` Without guard if `frm_js` undefined, ReferenceError due to direct global. They should use `window.frm_js` optional chain. Past comment flagged in previous review. Still unresolved. Should mention as ``? Past comment at lines "12-12" flagged same. We'll re-flag with `` and `raise_critical_issue` (since would throw). Provide diff.

- In `afterAddonInstall`, they set `addonStatus.textContent = response;` where `response` (string). Should we consider injection? textContent safe.

- `addonStatuses.forEach` doesn't guard when `parentElement` might be null? `el[0]` may be undefined? but `el` from `button.parent()` (jQuery). Could be? Probably.

- `buttonElement` if `button[0]` undefined? Should guard.

- In `afterAddonInstall`, `actionMap[action].message` etc. If `action` not one of keys, `actionMap[action]` undefined -> error. Should they guard? Possibly. We can note as major due to possible `undefined` if new action. But actions apparently from `toggleAddonState`. For `frm_uninstall_addon` etc. Could default.

- `saveAndReloadSettingsButton`: uses `saveAndReloadSettings()` function but defined near bottom. Works. But `saveAndReloadSettings` uses `fieldsUpdated` global? It's referencing `fieldsUpdated = 0;` but `fieldsUpdated` not declared anywhere in this file. Might be global. But this assignment without `var` may reference global; if not defined, reference error? `fieldsUpdated` variable? If using `fieldsUpdated = 0;` without `window.` will create global (if not in strict). But this module uses modules? It's bundler? The code may be in bundler (module). So `fieldsUpdated` may be global defined elsewhere or this will throw `ReferenceError` if `fieldsUpdated` undeclared (strict mode?). Are modules in bundler using Babel? If the bundler uses Webpack, by default modules are in strict mode. `fieldsUpdated = 0;` referencing undeclared variable would throw ReferenceError. Wait - but there might be global var defined? It's presumably global. If not imported, this will throw. Need to confirm: In module context, `fieldsUpdated` must be defined (maybe `import { fieldsUpdated } from ...`?). Without knowledge, we should mention? The old code maybe same? Maybe this function moved from previous code? need to check original? Without more context, uncertain.

Focus on instructions: we only have this file. `saveAndReloadSettings()` uses `fieldsUpdated = 0;`. Without `window`? If bundler ensures global, we should examine revolve. In old code maybe same. Should we flag? Without verifying, risk of new issue. If bundler executed in strict mode (ES module). But `fieldsUpdated` maybe defined globally in window. But to access global, should use `window.fieldsUpdated`. Without `var`, this will throw `ReferenceError`. I'd flag as major? In module strict mode, yes. Should consider verifying by knowledge of bundler (maybe Webpack in uses to import? Usually bundler wraps modules using `eval` etc in strict mode). I'd highlight caution.

But check: In `addon-state.js`, they use `frm_admin_js` global by direct reference, even though not defined. But they rely on bundler injecting global, and they disable eslint.

But `fieldsUpdated` is not declared anywhere else in this file. Possibly global defined in other script? Without context maybe there is global var fieldsUpdated. But to avoid false positive, we should check unstoppable.

But replicates earlier? Was this code existing previously? maybe they'd port old code.

Focus on confirm severity.

Another issue: In `toggleAddonState`, `const ajaxurl = window.ajaxurl ?? frm_js.ajax_url;` (lack guard). We'll comment.

Also `addonError`: `response.message` should be sanitized? They set using `.html`. For error message from server? Could contain markup. Already existing? maybe sanitized? Without knowledge.

Also `saveAndReloadSettingsButton` call `saveAndReloadSettings()` but function defined below, but referencing before defined is fine (function hoisted). But they call `saveAndReloadSettings()` from click. In `saveAndReloadSettings`, they do `fieldsUpdated = 0;` (without var). That will throw in strict mode? Should confirm: In modules, code is executed in strict mode automatically. Writing to undeclared variable will throw `ReferenceError`. Unless `fieldsUpdated` is defined as global var via `import`? Without glimpsed, hooking ?

Maybe there is `fieldsUpdated` global defined on `window`. In strict mode, assignment to `fieldsUpdated` w/out declaration: if `fieldsUpdated` exists as global property, you must use `window.fieldsUpdated`. Without `var`, the assignment will attempt to set `fieldsUpdated` property but first check lexical binding. Since there is no `fieldsUpdated` binding, runtime explores global lexical binding? Wait in strict mode, writing to an undeclared identifier is ReferenceError even if property exists on `window`. So yes, this will throw if module is in strict mode and no lexical binding. But there might be `import` or `global` `fieldsUpdated` defined via `/* global fieldsUpdated */`? Without glimpsing, risk.

Before raising comment, should confirm glimpsed cross code? maybe appareled? Without ability to search? Could use script? We can't run command. But we can rely on knowledge that this code might previously exist (maybe copy). But comment? We need to ensure no false positive.

Maybe check TOT unstoppable? Considering they port code from old inline script? Without new? Hmm.

Focus on more obvious issue: `frm_js` direct global.

When hooking? Provide diff.

Another potential: `addonStatuses` NodeList -> `addonStatus.appendChild` call ensures same element appended multiple times? referencing `getSaveAndReloadSettingsOptions` returns new element each call. But `appendChild` called on each iteration, but options node reused? The function returns new `div`, but for each `addonStatus`. ok.

`saveAndReloadSettings()` only handles presence: if `page` null nothing else. But if not in that context, does nothing (no reload). Should we request fallback? maybe lighten.

`saveAndReloadFormBuilder` uses `document.getElementById` and then `submitButton.classList`. If `submitButton` null, TypeError. Past comment flagged. Should guard. We should mention (lack guard). That's new? Without guard, on pages without that button, this will throw. That's a runtime crash. Should fix. This matches previous past comment flagged. So we must comment with ``.

Also `saveAndReloadSettings()` will call `form.submit()` but `fieldsUpdated = 0` still.

Focus on `toggleAddonState`: `frm_js` direct global.

Also `addonError`: `response` might be string? they assume object? If `extractErrorFromAddOnResponse` returns `false`, they skip. For error, function expected object with message.

But unstoppable.

Hence we will produce two comments for addon-state:

1. For `const ajaxurl = window.ajaxurl ?? frm_js.ajax_url;` raising (lack guard). Tag `` because previous comment flagged same.

2. For `saveAndReloadFormBuilder` missing null check - also flagged earlier; we must re-raise with ``.

3. Possibly highlight `lockIcon` or `button` guard? Already we flagged.

Need to mention possible fallback for `saveAndReloadSettings`? We can mention bigger?

Also we might mention the `fieldsUpdated = 0;` issue. Should we treat as new? I'd label `` or `critical`? If `fieldsUpdated` not defined, this would throw. Should we raise? We need to ensure not false positive. Maybe research? Without ability to search due to instructions? We can rely on knowledge of typical bundler (Webpack). Usually modules compiled to IIFE with `'use strict';`. Yes, writing to global by assignment to undefined variable inside module will throw. But is there guarantee `fieldsUpdated` defined as global? If hooking, there might be `let fieldsUpdated = 0;` defined in global script. But because module is bundler, they may expect to access global via `window.fieldsUpdated`. Without verifying, uncertain but probable issues.

Given instructions caution, we should only raise when fairly certain. Maybe there is global `fieldsUpdated` defined on `window`. But even so, to access in module they need to refer `window.fieldsUpdated`. Without more context, but old code might have used `fieldsUpdated = 0;` in non-module script (non-strict). They may have simply moved existing code into module? Without verifying, I might hold off to avoid false positive.

Focus on more certain issues.

Now craft review comments.

But before writing, need to update scratchpad with comment statuses.

First comment (lines 50-89). Provide message.

Let's craft:

Subject: "**Guard upgrade modal nodes before manipulating them**"

Explain: button, upgradeMessage, showLink, addonStatus can be null. If missing, TypeError. We should check.

Add diff to show guard.

Concise: "When markup missing, button null, calling `.className` etc throws. Need to bail."

Add diff:

if ( ! button || ! upgradeMessage || ! showLink || ! addonStatus ) {
	console.warn('frm upgrade modal missing expected elements');
	return;
}

Also adjust `getShowLinkHrefValue` to handle null showLink. Provide actual diff: either inside addOneClick or within helper.

Maybe doping to restructure: We can show modifications.

Also mention `getShowLinkHrefValue` should guard `showLink`.

Our comment should mention more coverage, but diff should approximate.

Ok.

Now comment 2 for injection. Provide diff from past comment.

Third comment for lockIcon: guard `use` element and ensure `lockIcon` before `parentNode`.

Fourth comment for button (with duplicate tag) plus guard `.frm_are_not_installed` etc. Provide diff.

Need to ensure each comment is precise.

Let's craft comment 1.

Since we must provide start and end line numbers; the first comment covering lines 29-89. We'll include subject.

While writing comment, mention unstoppable.

Add newline referencing TOT.

Let's compose.

Comment 1:


29-89: Guard upgrade modal nodes before manipulating them ...


In comment specify TOT.

Let's craft message:

"On Line 50, `button` may be null -> TypeError." etc.

Add diff.

Diff: show inserted guard after query selectors.

  • if ( ! button || ! upgradeMessage || ! showLink || ! addonStatus ) {
  •   console.warn( 'frm upgrade modal: expected elements missing' );
    
  •   return;
    
  • }

Also maybe guard `showLink` pass to helper.

Add suggestion to update helper to handle null.

Add to diff snippet.

Ok.

Now comment 2 (lines 66-70). Provide for injection. Tag `` security.

Diff: keep placeholder replaced by textContent.

  • upgradeMessage.innerHTML = newMessage;
  • if ( typeof upgradeLabel !== 'undefined' ) {
  •   const labelSpan = upgradeMessage.querySelector('.frm_feature_label');
    
  •   if ( labelSpan ) {
    
  •   	labelSpan.textContent = upgradeLabel;
    
  •   }
    
  • }

But we also need to remove earlier code. Show final diff. We'll craft.

Third comment lines 199-216.

Need to mention guard for `lockIcon`. Provide diff.

	if ( lockIcon ) {
		lockIcon.style.display = 'block';
		lockIcon.classList.remove('frm_lock_open_icon');
  •   	lockIcon.querySelector('use').setAttribute('href', '#frm_lock_icon');
    
  •   	const useEl = lockIcon.querySelector('use');
    
  •   	if ( useEl ) {
    
  •   		useEl.setAttribute('href', '#frm_lock_icon');
    
  •   	}
      }
    

...

  •   if ( element.dataset.image ) {
    
  •   	if ( lockIcon ) {
    
  •   		lockIcon.style.display = 'none';
    
  •   	}
    
  •   	lockIcon.parentNode.insertBefore(...);
    
  •   }
    
  •   if ( element.dataset.image && lockIcon ) {
    
  •   	lockIcon.style.display = 'none';
    
  •   	lockIcon.parentNode.insertBefore(..., lockIcon);
    
  •   }
    

Yes.

Fourth comment for lines 226-240. We need to mention that `modal.querySelector` results may be null; `button` may be null. Provide diff adding checks. Since repeated comment from past, include ``.

Add message referencing hooking.

Proposed diff:

  •   modal.querySelector( '.frm_are_not_installed' ).style.display = element.dataset.image ? 'none' : 'inline-block';
    
  •   modal.querySelector( '.frm_feature_label' ).textContent = upgradeLabel;
    
  •   modal.querySelector( 'h2' ).style.display = 'block';
    
  •   const notInstalled = modal.querySelector('.frm_are_not_installed');
    
  •   if ( notInstalled ) { ... }
    

...

  •   const button = modal.querySelector( '.button-primary:not(.frm-oneclick-button)' );
    
  •   link = button.getAttribute( 'href' )...
    
  •   button.setAttribute( 'href', link );
    
  •   const button = modal.querySelector(...);
    
  •   if ( button ) { ... }
    

Ok.

Need to mention that this is duplicate from previous comment.

Also, the function `getShowLinkHrefValue` uses showLink without guard. After we guard in addOneClick (ensured showLink), but ironically we require check earlier to ensure not null.

Maybe we propose modify helper to bail gracefully when showLink missing to avoid log. But we already bail.

But our diff ensures we return before call.

But we must mention whichever.

Now update scratchpad.

After finishing comments for this file, we must include file_end marker.

Before final, check for other issues? maybe `getShowLinkHrefValue` still uses showLink inside guard? Because we return earlier when showLink null. Good.

Also `const container = document.getElementById(...)` - if not found? `null`, then container query? They should guard after set? currently they go on: container null -> `container.querySelector` -> TypeError. Need to guard! We didn't mention. That's also serious. Should include comment? We can mention in same comment? We need to guard `container` before use.

Add to first comment? Should mention the early `container` check.

Maybe we first check:

if ( ! container ) {
return;
}


should exist. Without this, `container.querySelector` on null -> TypeError. Good catch. Should mention in comment.

Add to diff:

if ( ! container ) {
	return;
}

Add to comment 1.

Also `JSON.parse(oneclick)` may throw. Maybe good to wrap? optional. We'll mention maybe degrade? It's possible `data-oneclick` not valid JSON -> crash. But restful? We might mention `try/c`. But lighten.

Focus.

Construct comment accordingly.

Now craft comment.

After finishing, update scratchpad to note.

Then second file.

Now craft comment.

### Compose comment 1 content:

Need to mention sedation.

Concise message:

"Line 23: container may be null; we call querySelector -> TypeError. Similar for button etc."

Let's craft:

"Line 24" etc.

Remember to mention to add guard for `container`. Provide diff.

Ok.

Now output comment.

Need to produce final comment within `<!-- review_comment_start ~ line_ranges: ... -->`. Provide subject with bold text.

Add diff with ` ```diff`.

Let's craft.

Also must mention `Based on learnings` etc if referencing? Not necessary.

Let's create first comment.

Need to ensure adhesives.


21-90: ...


Better to include full range (21-90). We'll use 21-90 to include container code.

Let's craft.

Also we must abide instructions: "Provide a very short, concise explanation, only when subject line not enough." We'll include short explanation.

Focus.

### Compose comment 1 final text:

Subject e.g., "**Prevent null dereferences in upgrade modal setup**"

Then explanation: "container, button, etc may be null; we dereference, causing runtime crash."

Then diff snippet.

Remember to use tags ``.

Let's craft.

After comment, update scratchpad.

Then comment 2.

### Compose comment 2 lines 66-74.

Need to convict.

Subject: "**Stop injecting raw HTML into upgrade message**"

Explain.

Use ``.

Add diff.

Ok.

### Comment 3 lines 199-216.

Subject: "**Guard lock icon access before touching nested nodes**"

Tag ``.

Add diff.

### Comment 4 lines 226-240 (duplicate). Subject: "**Guard optional modal elements before mutation**"

Tag ``.

Add diff.

Ok.

Double-check comment content to ensure no duplicates.

After writing, update scratchpad to mark tasks done. Then `<!-- file_end -->`.

Now move to addon-state.

Add new scratchpad for file.

Need to inspect.

At top, `const ajaxurl = window.ajaxurl ?? frm_js.ajax_url;`. We'll comment.

Also `addonStatuses.forEach` retrieving `parentElement` from `el[0]` (which might be undefined). But `button` is jQuery of clicked element; `parent()` ensures jQuery object, but `el[0]` might be undefined if parent not found? But there will always be? If not, we may not know.

Focus on sure issues.

`addonStatuses` NodeList appended to `getSaveAndReloadSettingsOptions` - safe.

`saveAndReloadFormBuilder`: `submitButton` may be null. Should guard.

Also `frm_admin_js` global accessed w/out `window`. But likely defined global.

Now craft comment for `ajaxurl` (line 12). Provide diff to use safe fallback.

We must mention restful. Provide diff.

  • const ajaxurl = window.ajaxurl ?? frm_js.ajax_url;
  • const ajaxurl = window.ajaxurl || window.frm_js?.ajax_url || window.frmGlobal?.ajax_url;
  • if ( ! ajaxurl ) { console.error...; return; }

But we can't use optional chaining if not supported? but bundler likely support? we can use.

Now comment 2 for `saveAndReloadFormBuilder`.

Add guard.

const submitButton = document.getElementById('frm_submit_side_top');
  • if (!submitButton) {
  •   window.location.reload();
    
  •   return;
    
  • }

But original plan from previous comment - they suggested restful.

Ok.

Also we might mention `fieldsUpdated`? maybe not.

Now produce scratchpad updates.

Finally, produce final summary? Wait instructions: only review comments? I think we don't need general summary? Usually they'd expect actual review comments only? They asked to generate review comments on each changed code segment. After finishing file_end, done. But do we need general concluding statement? Not required? Usually final message may include "Thanks" etc? Actually instructions: final response should include reviews and comments. Probably no additional summary.

But they expect final comment? there isn't instructions to include general summary or overall suggestion. Probably mania.

Before final, ensure we followed instructions: "Wrap review and each comment with markers. Always emit start and end markers even if no comments." Already abiding.

Also maintain scratchpad? After finishing second file, we may update root scratchpad to mark tasks done? Maybe optional? but we can include final scratchpad.

Let's craft.

Proceed to produce comment 1.

Need to ensure we include scratchpad update.

After comment, update scratchpad to note.

Let's produce comment 1.

Remember to update top-level scratchpad to reflect tasks.

Also doping.

We'll produce comment 1 now. We'll embed.

Need to ensure withheld.

Let's go back to code: we need to include `frmDom` reference? In diff we use `console`. Should we hooking? It's fine.

Let's craft comment 1.

We'll include TOT to lighten.

 ngoku.

After comment, we must update scratchpad to mark portion of tasks done.

Ok.

We'll generate comment 1.

We need to ensure there is no other text outside.

Let's go.

 (Switch to final channel to produce comment? Wait we produce actual final answer after prepping all. But we can craft the entire final response at once. But to manage we can plan.

We produce final message containing for each file the markers etc. So we must prepare final message as single output: structure:

...

...

js/src/admin/addon-state.js (2)

12-12: Still vulnerable to ReferenceError when frm_js is undefined.

This issue was flagged previously but remains unfixed. Accessing frm_js directly without window. prefix will throw when the global is not defined.

Apply the previously suggested fix:

-	const ajaxurl = window.ajaxurl ?? frm_js.ajax_url; // eslint-disable-line camelcase
+	const ajaxurl =
+		window.ajaxurl ||
+		window.frm_js?.ajax_url ||
+		window.frmGlobal?.ajax_url; // eslint-disable-line camelcase
+	if ( ! ajaxurl ) {
+		console.error( 'No AJAX URL found (ajaxurl/frm_js.ajax_url/frmGlobal.ajax_url).' );
+		return;
+	}

207-213: Still missing null check for submit button.

This issue was flagged previously but remains unfixed. Accessing submitButton.classList on line 209 without a null check will throw on pages without #frm_submit_side_top.

Apply the previously suggested fix:

 function saveAndReloadFormBuilder() {
 	const submitButton = document.getElementById( 'frm_submit_side_top' );
+	if ( ! submitButton ) {
+		window.location.reload();
+		return;
+	}
 	if ( submitButton.classList.contains( 'frm_submit_ajax' ) ) {
 		submitButton.setAttribute( 'data-new-addon-installed', true );
 	}
 	submitButton.click();
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7166d3d and 0944011.

📒 Files selected for processing (3)
  • js/src/admin/addon-state.js (1 hunks)
  • js/src/admin/upgrade-popup.js (1 hunks)
  • js/src/frm_testing_mode.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • js/src/frm_testing_mode.js
🧰 Additional context used
🧬 Code graph analysis (1)
js/src/admin/upgrade-popup.js (1)
js/src/admin/admin.js (8)
  • frmDom (239-239)
  • frmDom (240-240)
  • frmDom (241-241)
  • event (1198-1198)
  • event (6698-6698)
  • event (10458-10458)
  • event (10556-10556)
  • event (10717-10717)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Run PHP Syntax inspection (8.3)
  • GitHub Check: Cypress
  • GitHub Check: PHP 8 tests in WP trunk
  • GitHub Check: PHP 7.4 tests in WP trunk

Comment thread js/src/admin/addon-state.js
Comment thread js/src/admin/addon-state.js
Comment thread js/src/admin/addon-state.js
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (8)
js/src/admin/addon-state.js (5)

182-182: Undefined reference to saveAndReloadSettings.

saveAndReloadSettings is called but it's defined locally in this same file at line 188. However, the function is defined after this call, which could cause issues during initialization if not hoisted properly. The code appears correct due to function hoisting, but for clarity, consider reordering.

While JavaScript function declarations are hoisted and this should work, verify that no initialization-time errors occur. If issues arise, consider moving the function declaration above its first use or using a different pattern.


12-12: Prevent ReferenceError when frm_js is undefined.

Direct access to frm_js will throw a ReferenceError if the global is not defined. Use window.frm_js with optional chaining as a safer alternative.

Apply this diff:

-	const ajaxurl = window.ajaxurl ?? frm_js.ajax_url; // eslint-disable-line camelcase
+	const ajaxurl = window.ajaxurl ?? window.frm_js?.ajax_url; // eslint-disable-line camelcase
+	if ( ! ajaxurl ) {
+		console.error( 'No AJAX URL found (ajaxurl/frm_js.ajax_url).' );
+		return;
+	}

89-89: Prevent ReferenceError when frm_admin_js is undefined.

Direct access to frm_admin_js will throw a ReferenceError if the global is not defined. Use window.frm_admin_js with a fallback.

Apply this diff:

-	const frmAdminJs = frm_admin_js; // eslint-disable-line camelcase
+	const frmAdminJs = window.frm_admin_js || {}; // eslint-disable-line camelcase
+	if ( ! frmAdminJs.active || ! frmAdminJs.installed || ! frmAdminJs.not_installed ) {
+		console.error( 'Missing required frm_admin_js properties (active, installed, not_installed).' );
+	}

157-157: Missing import for installAddonWithCreds.

Line 157 references installAddonWithCreds which is not imported. According to past review analysis, this function exists in ./admin.js but the import is missing from this module.

Add the missing import at the top of the file:

 import { __ } from '@wordpress/i18n';
+import { installAddonWithCreds } from './admin';
 
 const { div } = frmDom;

207-213: Guard against null submit button.

This function will throw if #frm_submit_side_top doesn't exist on the page.

Apply this diff:

 function saveAndReloadFormBuilder() {
 	const submitButton = document.getElementById( 'frm_submit_side_top' );
+	if ( ! submitButton ) {
+		window.location.reload();
+		return;
+	}
 	if ( submitButton.classList.contains( 'frm_submit_ajax' ) ) {
 		submitButton.setAttribute( 'data-new-addon-installed', true );
 	}
 	submitButton.click();
 }
css/frm_testing_mode.css (2)

3-3: Duplicate CSS properties remain unresolved.

Static analysis confirms duplicate text-align and border-radius properties still exist in the minified CSS. These were flagged in previous reviews but remain unaddressed. While the CSS is minified making precise location difficult, the duplicates should be removed from the source SCSS before minification.


1-3: Accessibility: Focus outlines removed without visible alternatives.

Previous review flagged that multiple rules set outline:none on :focus (often with !important), which is a major accessibility blocker. This issue remains unaddressed. Keyboard users need visible focus indicators.

As per previous review recommendations, provide visible :focus-visible styles with high specificity or !important for interactive elements (buttons, links, inputs, selects) in the test-mode UI.

js/src/admin/admin.js (1)

9112-9122: message is still undefined at this call site

afterAddonInstall(response, proceed, message, el); still references message without ever defining it in this scope, so the success handler will throw a ReferenceError and never complete. Please initialize message (for example, by looking up the .addon-status-label element like the other handlers do) before passing it along.

         const error = extractErrorFromAddOnResponse( response );
         if ( error ) {
           addonError( error, el, proceed );
           return;
         }
 
-        afterAddonInstall( response, proceed, message, el );
+        const message = el.parent().find( '.addon-status-label' );
+        afterAddonInstall( response, proceed, message, el );
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0944011 and 8696e23.

📒 Files selected for processing (12)
  • css/admin/frm-settings-components.css (1 hunks)
  • css/frm_testing_mode.css (1 hunks)
  • js/addons-page.js (1 hunks)
  • js/formidable-settings-components.js (1 hunks)
  • js/formidable_blocks.js (1 hunks)
  • js/formidable_dashboard.js (1 hunks)
  • js/formidable_overlay.js (1 hunks)
  • js/formidable_styles.js (1 hunks)
  • js/frm_testing_mode.js (1 hunks)
  • js/onboarding-wizard.js (1 hunks)
  • js/src/admin/addon-state.js (1 hunks)
  • js/src/admin/admin.js (6 hunks)
✅ Files skipped from review due to trivial changes (1)
  • css/admin/frm-settings-components.css
🧰 Additional context used
🧬 Code graph analysis (5)
js/src/admin/addon-state.js (1)
js/src/admin/admin.js (9)
  • frmDom (239-239)
  • frmDom (240-240)
  • frmDom (241-241)
  • response (9415-9415)
  • error (9115-9115)
  • frmAdminJs (238-238)
  • a (3031-3031)
  • submitButton (8584-8584)
  • submitButton (8592-8592)
js/src/admin/admin.js (2)
js/src/admin/upgrade-popup.js (2)
  • addOneClick (18-90)
  • button (32-32)
js/src/admin/addon-state.js (6)
  • button (16-16)
  • button (175-175)
  • message (19-19)
  • el (18-18)
  • extractErrorFromAddOnResponse (68-86)
  • addonError (149-163)
js/formidable_overlay.js (1)
js/src/admin/admin.js (34)
  • e (8151-8151)
  • t (692-692)
  • t (717-717)
  • t (8932-8932)
  • t (10118-10118)
  • a (3031-3031)
  • i (438-438)
  • i (1764-1764)
  • i (2242-2242)
  • i (2968-2968)
  • i (2983-2983)
  • i (3055-3055)
  • i (3073-3073)
  • i (3087-3090)
  • i (3113-3121)
  • i (3151-3151)
  • i (3160-3160)
  • i (3421-3427)
  • i (3542-3545)
  • i (5367-5367)
  • i (5436-5437)
  • i (5511-5513)
  • c (697-697)
  • c (722-722)
  • c (7189-7189)
  • c (9008-9008)
  • f (8947-8947)
  • s (274-274)
  • s (8157-8157)
  • s (8908-8908)
  • s (8985-8985)
  • frmDom (239-239)
  • frmDom (240-240)
  • frmDom (241-241)
js/frm_testing_mode.js (2)
js/src/admin/addon-state.js (2)
  • a (200-200)
  • frmDom (3-3)
js/src/frm_testing_mode.js (1)
  • frmDom (34-34)
js/onboarding-wizard.js (2)
js/src/admin/admin.js (44)
  • t (692-692)
  • t (717-717)
  • t (8932-8932)
  • t (10118-10118)
  • e (8151-8151)
  • i (438-438)
  • i (1764-1764)
  • i (2242-2242)
  • i (2968-2968)
  • i (2983-2983)
  • i (3055-3055)
  • i (3073-3073)
  • i (3087-3090)
  • i (3113-3121)
  • i (3151-3151)
  • i (3160-3160)
  • i (3421-3427)
  • i (3542-3545)
  • i (5367-5367)
  • i (5436-5437)
  • i (5511-5513)
  • a (3031-3031)
  • c (697-697)
  • c (722-722)
  • c (7189-7189)
  • c (9008-9008)
  • s (274-274)
  • s (8157-8157)
  • s (8908-8908)
  • s (8985-8985)
  • f (8947-8947)
  • p (8093-8093)
  • p (8108-8108)
  • v (3327-3327)
  • v (3347-3347)
  • v (6826-6826)
  • v (7193-7193)
  • v (7744-7744)
  • v (7760-7760)
  • v (7776-7776)
  • w (9481-9481)
  • frmDom (239-239)
  • frmDom (240-240)
  • frmDom (241-241)
js/src/admin/addon-state.js (3)
  • a (200-200)
  • frmDom (3-3)
  • ajaxurl (12-12)
🪛 Biome (2.1.2)
js/formidable_overlay.js

[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)

js/frm_testing_mode.js

[error] 2-2: This case is falling through to the next case.

Add a break or return statement to the end of this case to prevent fallthrough.

(lint/suspicious/noFallthroughSwitchClause)


[error] 2-2: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 2-2: Do not use the t variable name as a label

The variable is declared here

Creating a label with the same name as an in-scope variable leads to confusion.

(lint/suspicious/noLabelVar)


[error] 2-2: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 2-2: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 2-2: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 2-2: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)

css/frm_testing_mode.css

[error] 3-3: Unexpected shorthand property background after background-color

(lint/suspicious/noShorthandPropertyOverrides)


[error] 3-3: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

text-align is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)


[error] 3-3: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

border-radius is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)

js/addons-page.js

[error] 1-1: Unsafe usage of 'return'.

'return' in 'finally' overwrites the control flow statements inside 'try' and 'catch'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

'throw' in 'finally' overwrites the control flow statements inside 'try' and 'catch'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

'throw' in 'finally' overwrites the control flow statements inside 'try' and 'catch'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: Do not use the t variable name as a label

The variable is declared here

Creating a label with the same name as an in-scope variable leads to confusion.

(lint/suspicious/noLabelVar)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)

js/formidable-settings-components.js

[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)

js/formidable_blocks.js

[error] 1-1: Unsafe usage of 'return'.

'return' in 'finally' overwrites the control flow statements inside 'try' and 'catch'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

'throw' in 'finally' overwrites the control flow statements inside 'try' and 'catch'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)

js/formidable_dashboard.js

[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)

js/formidable_styles.js

[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 1-1: Do not use the t variable name as a label

The variable is declared here

Creating a label with the same name as an in-scope variable leads to confusion.

(lint/suspicious/noLabelVar)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 1-1: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)

js/onboarding-wizard.js

[error] 2-2: This case is falling through to the next case.

Add a break or return statement to the end of this case to prevent fallthrough.

(lint/suspicious/noFallthroughSwitchClause)


[error] 2-2: Unsafe usage of 'throw'.

'throw' in 'finally' overwrites the control flow statements inside 'try' and 'catch'.

(lint/correctness/noUnsafeFinally)


[error] 2-2: This case is falling through to the next case.

Add a break or return statement to the end of this case to prevent fallthrough.

(lint/suspicious/noFallthroughSwitchClause)


[error] 2-2: This case is falling through to the next case.

Add a break or return statement to the end of this case to prevent fallthrough.

(lint/suspicious/noFallthroughSwitchClause)


[error] 2-2: This case is falling through to the next case.

Add a break or return statement to the end of this case to prevent fallthrough.

(lint/suspicious/noFallthroughSwitchClause)


[error] 2-2: This case is falling through to the next case.

Add a break or return statement to the end of this case to prevent fallthrough.

(lint/suspicious/noFallthroughSwitchClause)


[error] 2-2: This case is falling through to the next case.

Add a break or return statement to the end of this case to prevent fallthrough.

(lint/suspicious/noFallthroughSwitchClause)


[error] 2-2: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 2-2: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 2-2: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 2-2: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 2-2: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 2-2: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 2-2: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 2-2: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 2-2: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)


[error] 2-2: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 2-2: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 2-2: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 2-2: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 2-2: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 2-2: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 2-2: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 2-2: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 2-2: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)


[error] 2-2: Do not reassign a function declaration.

Reassigned here.

Use a local variable instead.

(lint/suspicious/noFunctionAssign)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Cypress
  • GitHub Check: PHP 7.4 tests in WP trunk
  • GitHub Check: PHP 8 tests in WP trunk
🔇 Additional comments (1)
js/src/admin/addon-state.js (1)

193-193: WordPress hooks pattern properly replaces direct variable assignment.

Good use of wp.hooks.doAction('frm_reset_fields_updated') instead of directly manipulating an undeclared variable. This follows WordPress patterns and avoids the implicit global issue flagged in previous reviews.

Comment thread js/formidable_blocks.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant