Skip to content

Commit

Permalink
Update latest eslint and dependencies (#4345)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore authored Dec 22, 2024
1 parent 76dc1aa commit 8890a9b
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 79 deletions.
5 changes: 1 addition & 4 deletions lib/plugins/crawler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ export default class CrawlerPlugin extends SitespeedioPlugin {
for (let cookieParts of cookies) {
const parts = new Array(
cookieParts.slice(0, cookieParts.indexOf('=')),
cookieParts.slice(
cookieParts.indexOf('=') + 1,
cookieParts.length
)
cookieParts.slice(cookieParts.indexOf('=') + 1)
);
crawler.cookies.add(parts[0], parts[1]);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/html/templates/url/includes/tabScripts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-undef */
window.addEventListener('DOMContentLoaded', function () {
globalThis.addEventListener('DOMContentLoaded', function () {
let tabsRoot = document.querySelector('#tabs');

let navigationLinks = document.querySelectorAll('#pageNavigation a');
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/sustainable/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function getDirtiestResources(pageXray, greenDomains, CO2) {
}
allAssets.sort((a, b) => b.co2 - a.co2);

return allAssets.slice(0, allAssets.length > 10 ? 10 : allAssets.length);
return allAssets.slice(0, Math.min(allAssets.length, 10));
}

export function perParty(pageXray, greenDomains, CO2) {
Expand Down
152 changes: 82 additions & 70 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
"ava": "6.1.3",
"changelog-parser": "3.0.1",
"clean-css-cli": "5.6.3",
"eslint": "9.6.0",
"eslint": "9.7.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-unicorn": "54.0.0",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-unicorn": "56.0.1",
"feed": "4.2.2",
"jsdoc": "4.0.3",
"license-checker": "^25.0.0",
Expand Down

0 comments on commit 8890a9b

Please sign in to comment.