mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-02-21 00:02:44 +00:00
Twenty Twenty-One: Convert inline ESLint comments to JSHint.
WordPress Core currently uses JSHint instead of ESlint. See #51526. git-svn-id: https://develop.svn.wordpress.org/trunk@49575 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
db3ce8f32d
commit
2d2e1dd4ae
@ -5,7 +5,7 @@
|
||||
*
|
||||
* @return {number} - Returns the luminance, number between 0 and 255.
|
||||
*/
|
||||
function twentytwentyoneGetHexLum( hex ) { // eslint-disable-line no-unused-vars
|
||||
function twentytwentyoneGetHexLum( hex ) { // jshint ignore:line
|
||||
var rgb = twentytwentyoneGetRgbFromHex( hex );
|
||||
return Math.round( ( 0.2126 * rgb.r ) + ( 0.7152 * rgb.g ) + ( 0.0722 * rgb.b ) );
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
function toggleDarkMode() { // eslint-disable-line no-unused-vars
|
||||
function toggleDarkMode() { // jshint ignore:line
|
||||
var toggler = document.getElementById( 'dark-mode-toggler' );
|
||||
|
||||
if ( 'false' === toggler.getAttribute( 'aria-pressed' ) ) {
|
||||
|
||||
@ -58,7 +58,7 @@ function twentytwentyoneSubmenuPosition( li ) {
|
||||
*
|
||||
* @param {Element} el - The element.
|
||||
*/
|
||||
function twentytwentyoneExpandSubMenu( el ) { // eslint-disable-line no-unused-vars
|
||||
function twentytwentyoneExpandSubMenu( el ) { // jshint ignore:line
|
||||
// Close other expanded items.
|
||||
el.closest( 'nav' ).querySelectorAll( '.sub-menu-toggle' ).forEach( function( button ) {
|
||||
if ( button !== el ) {
|
||||
@ -114,7 +114,7 @@ function twentytwentyoneExpandSubMenu( el ) { // eslint-disable-line no-unused-v
|
||||
tabKey = event.keyCode === 9;
|
||||
shiftKey = event.shiftKey;
|
||||
escKey = event.keyCode === 27;
|
||||
activeEl = document.activeElement; // eslint-disable-line @wordpress/no-global-active-element
|
||||
activeEl = document.activeElement;
|
||||
lastEl = elements[ elements.length - 1 ];
|
||||
firstEl = elements[0];
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user