Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jetpack: Fix some minor eslint lints #39753

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Commits on Oct 11, 2024

  1. Jetpack: Fix some minor eslint lints

    Should be no functionality changes, unless some of the `react-hooks/`
    things were obscure bugs.
    
    * `curly` × 2: Missing `{}` around `if` bodies.
    * `eqeqeq` × 11: Use `===` and `!==` for comparisons.
    * `no-case-declarations` × 8: If a `case` has `const` or `let` inside,
      wrap it in a block for scoping.
    * `no-extra-boolean-cast` × 1: `if ( !! foo )` → `if ( foo )`.
    * `no-redeclare` × 2: A few useless `/* global JSON */`.
    * `no-undef` × 3: Remove some unused variables.
    * `no-unused-expressions` × 7: All ignored by updating
      `projects/plugins/jetpack/modules/.eslintrc.js`.
    * `no-useless-escape` × 4: Remove unnecessary `\`s in regexes.
    * `react-hooks/exhaustive-deps` × 3: Added missing deps.
      * One case needed a bit of refactoring.
    * `react-hooks/rules-of-hooks` × 5: Used `useSelect` and
      `useResizeObserver` unconditionally, and defined one that needed a
      conditional outside of `render()`.
    * `valid-typeof` × 2: Broken `undefined !== typeof window` check,
      changed to just use `window?` in later conditionals.
    * `@wordpress/no-global-active-element` × 2: Use `ownerDocument`.
    anomiex committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    e48beba View commit details
    Browse the repository at this point in the history