Skip to content

Ignore no-jquery errors with inline comments#2723

Merged
Crabcyborg merged 1 commit into
masterfrom
ignore_nojquery_errors_with_inline_comments
Jan 6, 2026
Merged

Ignore no-jquery errors with inline comments#2723
Crabcyborg merged 1 commit into
masterfrom
ignore_nojquery_errors_with_inline_comments

Conversation

@Crabcyborg

@Crabcyborg Crabcyborg commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

This should help detect most new uses of jQuery that we want to block and it makes it easier to find which code needs to update.

@coderabbitai

coderabbitai Bot commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Changes to js/formidable.js add eslint-disable-line comments to suppress specific lint rules (no-jquery/*, camelcase) on existing jQuery and DOM method calls. No functional behavior or logic is altered.

Changes

Cohort / File(s) Summary
Lint suppression annotations
js/formidable.js
Added eslint-disable-line comments throughout to suppress jQuery-related lint rules (no-val, no-serialize, no-closest, no-ajax, no-class, no-fade, no-is) and camelcase warnings on existing statements

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

run analysis, run tests

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to evaluate whether it relates to the changeset. Add a description explaining why these eslint-disable comments are necessary and whether this is a temporary or permanent solution.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding eslint-disable-line comments to suppress no-jquery lint errors throughout the file.
✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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)
js/formidable.js (1)

1059-1059: LGTM! Consider future refactoring.

The eslint suppressions for no-jquery/no-ajax, no-jquery/no-class, and no-jquery/no-fade are correctly applied. These jQuery methods are appropriate given the current codebase architecture.

Optional: Consider future refactoring

If reducing jQuery dependency is a long-term goal, these could eventually be replaced with native alternatives:

  • jQuery.ajax()fetch() API
  • hasClass()/addClass()classList API
  • fadeIn() → CSS transitions or Web Animations API

However, this is purely optional and not required for this PR, which correctly achieves its stated objective of suppressing the lint warnings.

Also applies to: 1293-1293, 1302-1302, 1335-1335

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8f87ddf and df4da1b.

⛔ Files ignored due to path filters (1)
  • .eslintrc.json is excluded by !**/*.json
📒 Files selected for processing (1)
  • js/formidable.js
⏰ 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: PHP 8 tests in WP 6.9
  • GitHub Check: PHP 7.4 tests in WP 6.9
  • GitHub Check: Cypress
  • GitHub Check: PHP 8 tests in WP 6.9
  • GitHub Check: PHP 7.4 tests in WP 6.9
  • GitHub Check: Cypress
🔇 Additional comments (2)
js/formidable.js (2)

420-420: LGTM!

The eslint suppressions for no-jquery/no-val and no-jquery/no-serialize are appropriately applied to these jQuery method calls. The additional camelcase suppression on line 854 correctly handles the external frm_js.nonce property.

Also applies to: 854-854


926-926: LGTM!

The eslint suppressions for no-jquery/no-closest and no-jquery/no-is are correctly applied to the jQuery DOM traversal and visibility checking methods used in the form error handling logic.

Also applies to: 967-968, 979-979

@Crabcyborg
Crabcyborg merged commit 702ecba into master Jan 6, 2026
36 checks passed
@Crabcyborg
Crabcyborg deleted the ignore_nojquery_errors_with_inline_comments branch January 6, 2026 19:28
stephywells pushed a commit that referenced this pull request Apr 4, 2026
…inline_comments

Ignore no-jquery errors with inline comments
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