Make WordPress Core

Changeset 49575


Ignore:
Timestamp:
11/12/2020 06:46:44 PM (4 years ago)
Author:
desrosj
Message:

Twenty Twenty-One: Convert inline ESLint comments to JSHint.

WordPress Core currently uses JSHint instead of ESlint.

See #51526.

Location:
trunk/src/wp-content/themes/twentytwentyone/assets/js
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/assets/js/customize-helpers.js

    r49574 r49575  
    66 * @return {number} - Returns the luminance, number between 0 and 255.
    77 */
    8 function twentytwentyoneGetHexLum( hex ) { // eslint-disable-line no-unused-vars
     8function twentytwentyoneGetHexLum( hex ) { // jshint ignore:line
    99    var rgb = twentytwentyoneGetRgbFromHex( hex );
    1010    return Math.round( ( 0.2126 * rgb.r ) + ( 0.7152 * rgb.g ) + ( 0.0722 * rgb.b ) );
  • trunk/src/wp-content/themes/twentytwentyone/assets/js/dark-mode-toggler.js

    r49574 r49575  
    1 function toggleDarkMode() { // eslint-disable-line no-unused-vars
     1function toggleDarkMode() { // jshint ignore:line
    22    var toggler = document.getElementById( 'dark-mode-toggler' );
    33
  • trunk/src/wp-content/themes/twentytwentyone/assets/js/primary-navigation.js

    r49574 r49575  
    5959 * @param {Element} el - The element.
    6060 */
    61 function twentytwentyoneExpandSubMenu( el ) { // eslint-disable-line no-unused-vars
     61function twentytwentyoneExpandSubMenu( el ) { // jshint ignore:line
    6262    // Close other expanded items.
    6363    el.closest( 'nav' ).querySelectorAll( '.sub-menu-toggle' ).forEach( function( button ) {
     
    115115            shiftKey = event.shiftKey;
    116116            escKey = event.keyCode === 27;
    117             activeEl = document.activeElement; // eslint-disable-line @wordpress/no-global-active-element
     117            activeEl = document.activeElement;
    118118            lastEl = elements[ elements.length - 1 ];
    119119            firstEl = elements[0];
Note: See TracChangeset for help on using the changeset viewer.