Skip to content
Open
14 changes: 13 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import prettierConfig from 'eslint-config-prettier';
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import unusedImports from 'eslint-plugin-unused-imports';

const baseRestrictedSyntax = [
{
Expand Down Expand Up @@ -191,9 +192,20 @@ export default [
},
plugins: {
rovalra: customPlugin,
'unused-imports': unusedImports,
},
rules: {
'no-unused-vars': 'warn',
'no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
'no-empty': ['error', { allowEmptyCatch: true }],
'rovalra/restricted-syntax-verified': [
'error',
Expand Down
17 changes: 17 additions & 0 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"esbuild": "^0.28.0",
"eslint": "10.4.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-unused-imports": "^4.4.1",
"globals": "^17.6.0",
"prettier": "^3.8.3",
"prettier-eslint": "^16.4.2",
Expand All @@ -38,4 +39,4 @@
"*.js": "eslint --fix",
"*.{js,json,css,md}": "prettier --write"
}
}
}
1 change: 0 additions & 1 deletion src/content/core/catalog/purchasePromptItemId.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { observeElement, observeChildren } from '../observer.js';
import { getPlaceIdFromUrl } from '../idExtractor.js';
import { callRobloxApiJson } from '../api.js';
import { getItemDetails } from './itemPrice.js';

export const getUniverseId = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/content/core/countries.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
console.log("hi") // I cant for the life of me remember why i made this script...
console.log("hi"); // I cant for the life of me remember why i made this script...
11 changes: 4 additions & 7 deletions src/content/core/donators/settingHandler.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import { callRobloxApiJson } from '../api.js';
import { getValidAccessToken } from '../oauth/oauth.js';
import { getAuthenticatedUserId } from '../user.js';
import {
syncDonatorTier,
} from '../settings/handlesettings.js';
import { getCurrentUserTier } from '../settings/handlesettings.js';
import {
TRUSTED_USER_IDS,
ARTIST_USER_IDS,
RAT_BADGE_USER_ID,
BLAHAJ_BADGE_USER_ID,
CAM_BADGE_USER_ID,
alice_badge_user_id,
GILBERT_USER_ID,
TRUSTED_USER_IDS
} from '../configs/userIds.js';
import * as cache from '../storage/cacheHandler.js';

Expand Down
1 change: 0 additions & 1 deletion src/content/core/games/servers/serverdetails.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// adds information about servers

import { callRobloxApi } from '../../api.js';
import { observeElement } from '../../observer.js';
import { loadDatacenterMap, datacenterList } from '../../regions.js';
import { getPlaceIdFromUrl } from '../../idExtractor.js';
Expand Down
3 changes: 0 additions & 3 deletions src/content/core/transactions/fiat.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ export {
TRANSACTION_FIAT_RATE_OPTIONS,
} from './fiatConfig.js';
import {
DEVEX_USD_RATE,
ROBUX_FIAT_RATE_MODE_DEVEX,
ROBUX_FIAT_RATE_MODE_NORMAL,
ROBUX_FIAT_SETTINGS_DEFAULTS,
} from './fiatConfig.js';

Expand Down
3 changes: 1 addition & 2 deletions src/content/core/ui/inventory.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Smartest not to use!!!
import DOMPurify from 'dompurify';
import { safeHtml } from '../../core/packages/dompurify.js'
import { safeHtml } from '../../core/packages/dompurify.js';

export function createInventoryOverlay(options) {
const { title, stat, rolimonsUrl, onSearch, onLoadMore } = options;
Expand Down
2 changes: 1 addition & 1 deletion src/content/core/utils/trackers/servers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { callRobloxApi } from '../../api.js';

let latestPresence = null;
const subscribers = new Set();
Expand Down Expand Up @@ -29,6 +28,7 @@ export function init() {

chrome.runtime.sendMessage({ action: 'getLatestPresence' }, (response) => {
if (chrome.runtime.lastError) {
return;
} else if (response && response.presence) {
latestPresence = response.presence;
broadcast(latestPresence);
Expand Down
3 changes: 0 additions & 3 deletions src/content/features/catalog/40method.js
Original file line number Diff line number Diff line change
Expand Up @@ -887,9 +887,6 @@ export const createAndShowPopup = (onSave, initialState = null) => {
return;
}

if (initialState && initialState.view === 'validation-warning') {
}

viewValidationWarning.classList.remove('sr-hidden');
};

Expand Down
4 changes: 2 additions & 2 deletions src/content/features/developer/rendertest.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
AnimatorWrapper
} from 'roavatar-renderer';
// This script is kinad outdated
FLAGS.ASSETS_PATH = chrome.runtime.getURL("assets/rbxasset/")
FLAGS.USE_WORKERS = false
FLAGS.ASSETS_PATH = chrome.runtime.getURL("assets/rbxasset/");
FLAGS.USE_WORKERS = false;

let currentRig = null;
let lastFrameTime = Date.now() / 1000;
Expand Down
3 changes: 1 addition & 2 deletions src/content/features/games/privateserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ import { observeElement, observeAttributes } from '../../core/observer.js';
import { getPlaceIdFromUrl } from '../../core/idExtractor.js';
import { getAuthenticatedUserId } from '../../core/user.js';
import { createButton } from '../../core/ui/buttons.js';
import { callRobloxApi, callRobloxApiJson } from '../../core/api.js';
import { callRobloxApi } from '../../core/api.js';
import { enhanceServer } from '../../core/games/servers/serverdetails.js';
import { loadDatacenterMap, serverIpMap } from '../../core/regions.js';
import { t, ts } from '../../core/locale/i18n.js';
import DOMPurify from 'dompurify';
import { addTooltip } from '../../core/ui/tooltip.js';

const privateServerContext = {
serverLocations: {},
Expand Down
2 changes: 0 additions & 2 deletions src/content/features/games/quickplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import { callRobloxApi } from '../../core/api.js';
import {
launchGame,
launchPrivateGame,
launchMultiplayerGame,
} from '../../core/utils/launcher.js';
import {
getRegionData,
getFullRegionName,
REGIONS,
} from '../../core/regions.js';
Expand Down
20 changes: 14 additions & 6 deletions src/content/features/games/revertlogo.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import { observeElement } from '../../core/observer.js';
import { fetchThumbnails } from '../../core/thumbnail/thumbnails.js';
<<<<<<< HEAD
import { loadDatacenterMap, serverIpMap } from '../../core/regions.js';
=======
import {
loadDatacenterMap,
getRegionData,
serverIpMap,
} from '../../core/regions.js';
>>>>>>> ba4b86e (cleanup: linting autofix)
import { callRobloxApi } from '../../core/api.js';
import DOMPurify from 'dompurify';
import { launchGame } from '../../core/utils/launcher.js';
Expand Down Expand Up @@ -181,7 +189,7 @@ async function fetchUserPresence(userId) {
data?.userPresences?.[0]?.placeId ||
null
);
} catch (e) {
} catch {
return null;
}
}
Expand Down Expand Up @@ -382,7 +390,7 @@ async function pollClientStatus(targetPlaceId) {
const data = await response.json();
handleClientStatus(data);
}
} catch (e) {}
} catch {}
};

const handleClientStatus = (data) => {
Expand Down Expand Up @@ -458,7 +466,7 @@ async function pollClientStatus(targetPlaceId) {
}
}
}
} catch (e) {}
} catch {}
}, 3000);
}
}
Expand Down Expand Up @@ -568,7 +576,7 @@ function initializeJoinDialogEnhancer() {
new URL(decodedUrlString).search,
);
placeId = urlParams.get('placeId');
} catch (e) {
} catch {
showLoadingOverlayResult(
await t('revertLogo.errorParsingUrl'),
{
Expand Down Expand Up @@ -775,7 +783,7 @@ function initializeJoinDialogEnhancer() {
thumbData?.imageUrl || null,
};
}
} catch (e) {}
} catch {}
}

regionCode = joinApiResponse.country;
Expand Down Expand Up @@ -872,7 +880,7 @@ function initialize() {
try {
initRevertLogo();
initializeJoinDialogEnhancer();
} catch (e) {}
} catch {}
}

export function init() {
Expand Down
10 changes: 5 additions & 5 deletions src/content/features/games/serverlist/recentservers.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function createServerItem(serverData, userThumbnailUrl, userId) {
return serverItem;
}

function createModernServerItem(serverData, userThumbnailUrl, userId) {
function createModernServerItem(serverData, userThumbnailUrl) {
const { presence, timestamp } = serverData;
const serverItem = document.createElement('div');
serverItem.className =
Expand Down Expand Up @@ -184,7 +184,7 @@ async function checkServerIsActive(placeId, gameId) {
}

return false;
} catch (error) {
} catch {
return false;
}
}
Expand Down Expand Up @@ -484,7 +484,7 @@ async function renderRecentServers(section) {
const noServers = document.createElement('div');
noServers.className =
'section-content-off empty-game-instances-container';
noServers.innerHTML = `<p class="no-servers-message">${await t('recentServers.noneFound')}</p>`;
noServers.innerHTML = `<p class="no-servers-message">${await t('recentServers.noneFound')}</p>`; // Verified
gridContainer.appendChild(noServers);
return;
}
Expand All @@ -504,7 +504,7 @@ async function renderRecentServers(section) {
const noActive = document.createElement('div');
noActive.className =
'section-content-off empty-game-instances-container';
noActive.innerHTML = `<p class="no-servers-message">${await t('recentServers.noActiveFound')}</p>`;
noActive.innerHTML = `<p class="no-servers-message">${await t('recentServers.noActiveFound')}</p>`; // Verified
gridContainer.appendChild(noActive);
return;
}
Expand Down Expand Up @@ -569,7 +569,7 @@ async function renderRecentServers(section) {
const noActive = document.createElement('div');
noActive.className =
'section-content-off empty-game-instances-container';
noActive.innerHTML = `<p class="no-servers-message">${ts('recentServers.noActiveFound')}</p>`;
noActive.innerHTML = `<p class="no-servers-message">${ts('recentServers.noActiveFound')}</p>`; // Verified
gridContainer.appendChild(noActive);
}
if (obsReq) obsReq.active = false;
Expand Down
Loading