Add linter fixes for new AI samples (#1484)

This commit is contained in:
Oliver Dunk
2025-06-02 12:46:10 +01:00
committed by GitHub
parent 20d36c7780
commit 08e8c96c5f
4 changed files with 4 additions and 5 deletions

View File

@@ -65,6 +65,7 @@ module.exports = [
'_archive/**/*',
'**/third-party/**',
'**/node_modules/**/*',
'**/dist/**/*',
// These are autogenerated files that we shouldn't lint
'functional-samples/cookbook.wasm-helloworld-print/wasm/pkg/**/*',
'functional-samples/cookbook.wasm-helloworld-print-nomodule/wasm/pkg/**/*'

View File

@@ -26,7 +26,7 @@ async function generateAltText(imgSrc) {
return await session.prompt(prompt);
}
chrome.contextMenus.onClicked.addListener(async (info, tab) => {
chrome.contextMenus.onClicked.addListener(async (info, _tab) => {
if (info.menuItemId === 'generateAltText' && info.srcUrl) {
// Start opening the popup
const [result] = await Promise.allSettled([

View File

@@ -10,7 +10,6 @@ document.addEventListener('DOMContentLoaded', () => {
async function renderMessages() {
messageList.innerHTML = ''; // Clear existing messages
let delay = 0; // Initial delay
const delayIncrement = 3000; // 5 seconds in milliseconds
await timeout(3000);

View File

@@ -67,11 +67,10 @@ chrome.runtime.onMessage.addListener(async ({ data }) => {
});
function isValidUrl(string) {
let url;
try {
url = new URL(string);
new URL(string);
return true;
// eslint-disable-next-line no-unused-vars
} catch (_) {
return false;
}