Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
const prettier = require('eslint-plugin-prettier');
const globals = require('globals');
const js = require('@eslint/js');
const { FlatCompat } = require('@eslint/eslintrc');

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

module.exports = [
{
ignores: ['**/dist/', '**/node_modules/', '**/test/', '**/tools/']
},
...compat.extends('eslint:recommended'),
js.configs.recommended,
{
plugins: {
prettier
Expand Down
2 changes: 1 addition & 1 deletion lib/dom/performance/firstContentfulPaint.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function (util) {
'use strict';
let score = 100;
let advice = '';
let advice;
const good = 1800;
const needImprovement = 3000;

Expand Down
2 changes: 1 addition & 1 deletion lib/dom/performance/interactionToNextPaint.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// needs improvement 200–500 ms
// poor > 500 ms
let score = 100;
let advice = '';
let advice;
const offending = [];
const good = 200;
const needImprovement = 500;
Expand Down
1 change: 0 additions & 1 deletion lib/har/performance/avoidRenderBlocking.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export default {
) {
if (page.renderBlocking && Object.keys(page.renderBlocking).length > 0) {
// we use Chrome(ium) and have render blocking info
advice = '';
for (let asset of page.assets) {
if (
(asset.renderBlocking && asset.renderBlocking === 'blocking') ||
Expand Down
2 changes: 1 addition & 1 deletion lib/har/privacy/thirdPartyPrivacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default {
: 0;

let score = 100 - Math.round(thirdPartyPercent);
let advice = '';
let advice;
if (thirdPartyPercent === 100) {
advice =
'The page has 100% of third party requests! Something is probably wrong? Verify that you test the right page.';
Expand Down
4 changes: 2 additions & 2 deletions lib/technologies/wappalyzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export function analyze(items, technologies = state.technologies) {
.flat()
.filter((t) => t);
} catch (error) {
throw new Error(error.message || error.toString());
throw new Error(error.message || error.toString(), { cause: error });
}
}

Expand All @@ -380,7 +380,7 @@ function resolveExcludes(resolved) {
}

function resolveImplies(resolved) {
let done = false;
let done;
do {
done = true;
resolved.forEach(({ technology, confidence, lastUrl }) => {
Expand Down
Loading