Skip to content

Commit

Permalink
style: misc ESLint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Jan 30, 2025
1 parent d5fe40c commit 74c034a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions docs/assets/javascript/cookies.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ Cookies.prototype.init = function () {
Cookies.prototype.load = function (config) {
if (config.analytics) {
window.dataLayer = window.dataLayer || []
function gtag() {
dataLayer.push(arguments)
}

gtag('js', new Date())
gtag('config', 'G-VTGX4YLSVL')
} else {
Expand Down Expand Up @@ -60,4 +56,8 @@ Cookies.prototype.reject = function () {
window.location.reload()
}

function gtag() {
dataLayer.push(arguments)
}

export default Cookies
2 changes: 1 addition & 1 deletion gulp/build-compress-images.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gulp.task('build:compress-images', async () => {
const { default: imagemin } = await import('gulp-imagemin')

return gulp
.src('package/moj/assets/images/' + '**/*.+(png|jpg|jpeg|gif|svg)')
.src('package/moj/assets/images/**/*.+(png|jpg|jpeg|gif|svg)')
.pipe(
cache(
imagemin({
Expand Down
4 changes: 2 additions & 2 deletions jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ require('@testing-library/jest-dom')
require('./src/moj/vendor/jquery')
require('mock-match-media/jest-setup')
const { toHaveNoViolations } = require('jest-axe')
expect.extend(toHaveNoViolations)

MOJFrontend = {}
expect.extend(toHaveNoViolations)
window.MOJFrontend = {}
2 changes: 1 addition & 1 deletion src/moj/components/form-validator/form-validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MOJFrontend.FormValidator.entityMap = {
}

MOJFrontend.FormValidator.prototype.escapeHtml = function (string) {
return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap(s) {
return String(string).replace(/[&<>"'`=/]/g, function fromEntityMap(s) {
return MOJFrontend.FormValidator.entityMap[s]
})
}
Expand Down

0 comments on commit 74c034a

Please sign in to comment.