From 3a60aaa4dfad31d49f49d7c7adfb632198956c09 Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Wed, 24 Aug 2016 05:55:26 -0300 Subject: [PATCH] Issue #17 - Fix ESLint errors, including removing extra parentheses. --- js/customize-snapshots-admin.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/js/customize-snapshots-admin.js b/js/customize-snapshots-admin.js index 702498b4..98f1acdc 100644 --- a/js/customize-snapshots-admin.js +++ b/js/customize-snapshots-admin.js @@ -1,4 +1,5 @@ ( function( $ ) { + 'use strict'; $( function() { var $link, linkText, linkActions, dataSlug, initializeLink; @@ -26,18 +27,18 @@ settingId = $( this ).attr( 'id' ); this.isLinkSetToRemoveSetting = function() { - return ( linkActions[ 0 ] === clickedLinkAction ); + return linkActions[ 0 ] === clickedLinkAction; }; this.hideSettingAndChangeLinkText = function() { $clickedLink.text( linkText[ 1 ] ) .data( dataSlug, linkActions[ 1 ] ) - .after( this.constructHiddenInputWithValue( settingId ) ); + .after( this.constructHiddenInputWithValue() ); $settingDisplay.removeAttr( 'open' ) .addClass( 'cs-removed' ); }; - this.constructHiddenInputWithValue = function( settingId ) { + this.constructHiddenInputWithValue = function() { return $( '' ).attr( { 'name': 'customize_snapshot_remove_settings[]', 'type': 'hidden' @@ -46,7 +47,7 @@ }; this.isLinkSetToRestoreSetting = function() { - return ( linkActions[ 1 ] === clickedLinkAction ); + return linkActions[ 1 ] === clickedLinkAction; }; this.showSettingAndChangeLinkText = function() { @@ -69,4 +70,4 @@ } ); } ); -}( jQuery ) ); +} )( jQuery );