Skip to content

Commit 48d6569

Browse files
committed
fix: eslint errors
1 parent a926b65 commit 48d6569

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

js/src/ajax-load.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const AjaxLoad = (($) => {
4949
this._element = element
5050

5151
const url = location.hash.replace(/^#/, '')
52+
// eslint-disable-next-line no-unused-expressions
5253
url !== '' ? this.setUpUrl(url) : this.setUpUrl(this._config.defaultPage)
5354
this._addEventListeners()
5455
}
@@ -77,6 +78,7 @@ const AjaxLoad = (($) => {
7778
async: false,
7879
success: function success() {
7980
if (typeof Pace !== 'undefined') {
81+
// eslint-disable-next-line no-undef
8082
Pace.restart()
8183
}
8284
$('body').animate({
@@ -122,6 +124,7 @@ const AjaxLoad = (($) => {
122124
}
123125

124126
_addEventListeners() {
127+
// eslint-disable-next-line prefer-template
125128
$(document).on(Event.CLICK, Selector.NAV_LINK + '[href!="#"]', (event) => {
126129
event.preventDefault()
127130
event.stopPropagation()

js/src/utilities/get-style.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
* --------------------------------------------------------------------------
66
*/
77

8-
const getStyle = (property, element = document.body) => {
9-
const style = window.getComputedStyle(element, null).getPropertyValue(property).replace(/^\s/, '')
10-
11-
return style
12-
}
8+
const getStyle = (property, element = document.body) => window.getComputedStyle(element, null).getPropertyValue(property).replace(/^\s/, '')
139

1410
export default getStyle

js/src/utilities/rgb-to-hex.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const rgbToHex = (color) => {
1212
const g = `0${parseInt(rgb[2], 10).toString(16)}`
1313
const b = `0${parseInt(rgb[3], 10).toString(16)}`
1414

15-
return (rgb && rgb.length === 4) ? `#${r.slice(-2)}${g.slice(-2)}${b.slice(-2)}` : ''
15+
return rgb ? `#${r.slice(-2)}${g.slice(-2)}${b.slice(-2)}` : ''
1616
}
1717

1818
export default rgbToHex

0 commit comments

Comments
 (0)