diff --git a/.eslintrc.json b/.eslintrc.json index f38b319..f0f4460 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -19,11 +19,13 @@ "assets/js/scripts.js", "assets/js/tinymce-shortcode.js", "assets/js/asp-ajax.js", - "assets/js/decree-search.js" + "assets/js/decree-search.js", + "src/js/typewriter-effect.min.js" ], "rules": { "no-param-reassign": 0, "no-shadow": "off", - "no-new": "off" + "no-new": "off", + "import/extensions": ["error", "always"] } } diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0584e70..255eed6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,8 +26,11 @@ jobs: name: Install dependencies run: npm ci - - name: Run linter + name: Run SASS linter run: npm run sass:lint + - + name: Run JavaScript linter + run: npm run js:lint - name: Check EditorConfig configuration run: test -f .editorconfig diff --git a/package.json b/package.json index e8a0ed6..39d3438 100644 --- a/package.json +++ b/package.json @@ -42,8 +42,8 @@ "stylelint-order": "^6.0.3" }, "engines": { - "node": "^18.12", - "npm": "^9.2", + "node": "^20.11", + "npm": "^10.2", "yarn": "please-use-npm" } } diff --git a/src/js/cookie-consent.js b/src/js/cookie-consent.js index 4b58e1b..83cbbe1 100644 --- a/src/js/cookie-consent.js +++ b/src/js/cookie-consent.js @@ -3,7 +3,7 @@ import { } from './cookie.js'; (() => { - const lang = document.documentElement.lang; + const { lang } = document.documentElement; const prefix = 'cone'; const btns = document.querySelectorAll('button[data-action="cookie"]'); let caption = ''; diff --git a/src/js/scripts.js b/src/js/scripts.js index dd41f87..968eacc 100644 --- a/src/js/scripts.js +++ b/src/js/scripts.js @@ -18,7 +18,7 @@ if (getCookie('cone-cookie-law-analytics') === 'accepted') { gtag('js', new Date()); gtag('config', coneGtagId, { - 'cookie_domain': window.location.hostname, - 'cookie_flags': 'SameSite=None;Secure' + cookie_domain: window.location.hostname, + cookie_flags: 'SameSite=None;Secure', }); }