Skip to content

Commit 1422f90

Browse files
authored
Merge pull request #77 from PSDTools/dependabot/npm_and_yarn/lint-b4799ae38c
chore(deps-dev): bump the lint group across 1 directory with 2 updates
2 parents 980da1f + 5cfb3cd commit 1422f90

File tree

9 files changed

+516
-493
lines changed

9 files changed

+516
-493
lines changed

apps/gpa-calculator/eslint.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ import { sheriff } from "eslint-config-sheriff";
33
import { defineFlatConfig } from "eslint-define-config";
44

55
/**
6-
* @import {SheriffSettings} from "@sherifforg/types"
6+
* @import {SheriffSettings} from "eslint-config-sheriff"
77
*/
88

99
const sheriffOptions = /** @satisfies {SheriffSettings} */ ({
1010
react: false,
1111
lodash: false,
12+
remeda: false,
1213
next: false,
1314
playwright: false,
1415
jest: false,

apps/gpa-calculator/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,13 @@
3939
},
4040
"devDependencies": {
4141
"@eslint-types/unicorn": "^52.0.0",
42-
"@sherifforg/types": "^4.1.0",
4342
"@total-typescript/ts-reset": "^0.6.1",
4443
"@types/eslint": "~9.6.1",
4544
"@vite-pwa/assets-generator": "^0.2.6",
4645
"browserslist": "^4.23.3",
4746
"browserslist-to-esbuild": "^2.1.1",
48-
"eslint": "^9.10.0",
49-
"eslint-config-sheriff": "^21.2.0",
47+
"eslint": "^9.13.0",
48+
"eslint-config-sheriff": "^25.0.0",
5049
"eslint-define-config": "^2.1.0",
5150
"fontaine": "^0.5.0",
5251
"lightningcss": "^1.26.0",

apps/gpa-calculator/src/script.ts

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@ import {
1919
} from "./scripts/storage.js";
2020

2121
declare global {
22-
interface Window {
23-
hsmsSwap: () => Promise<void>;
24-
classAmount: () => Promise<void>;
25-
loadgpa: () => Promise<void>;
26-
clearData: () => Promise<void>;
27-
clearAll: () => Promise<void>;
28-
toggleNav: (open: boolean) => void;
29-
startApp: () => Promise<void>;
30-
darkMode: () => Promise<void>;
31-
}
22+
function hsmsSwap(): Promise<void>;
23+
function classAmount(): Promise<void>;
24+
function loadgpa(): Promise<void>;
25+
function clearData(): Promise<void>;
26+
function clearAll(): Promise<void>;
27+
function toggleNav(open: boolean): void;
28+
function startApp(): Promise<void>;
29+
function darkMode(): Promise<void>;
3230
}
3331

3432
let courses: Course[] = [];
@@ -45,8 +43,8 @@ const middle = "Middle School";
4543
const hsmsInput = document.querySelector("input#hsmsInput")!;
4644
const gradeLvl = document.querySelector("#gradeLvl")!;
4745

48-
window.clearData = clearData;
49-
window.clearAll = clearAll;
46+
globalThis.clearData = clearData;
47+
globalThis.clearAll = clearAll;
5048

5149
/**
5250
* Toggle the navigation.
@@ -64,7 +62,7 @@ function toggleNav(open: boolean): void {
6462
classlist?.add(open ? w100 : w0);
6563
classlist?.remove(open ? w0 : w100);
6664
}
67-
window.toggleNav = toggleNav;
65+
globalThis.toggleNav = toggleNav;
6866

6967
function getTypeIds(): NodeListOf<HTMLSpanElement> {
7068
return document.querySelectorAll('span[id^="typeId"]');
@@ -101,7 +99,7 @@ async function hsmsSwap(): Promise<void> {
10199
}
102100
}
103101
}
104-
window.hsmsSwap = hsmsSwap;
102+
globalThis.hsmsSwap = hsmsSwap;
105103

106104
/**
107105
* Create a `Course`.
@@ -233,7 +231,7 @@ async function loadgpa(): Promise<void> {
233231
document.querySelector(`select#cl${itr + 1}`)!.value;
234232
}
235233
}
236-
window.loadgpa = loadgpa;
234+
globalThis.loadgpa = loadgpa;
237235

238236
async function classAmount(): Promise<void> {
239237
courses = []; // if storage don't exist, create the array
@@ -268,7 +266,7 @@ async function classAmount(): Promise<void> {
268266
// sets the gpa text to ""
269267
document.querySelector("h2#gpa")!.innerHTML = "";
270268
}
271-
window.classAmount = classAmount;
269+
globalThis.classAmount = classAmount;
272270

273271
/**
274272
* Populates course object data.
@@ -354,4 +352,4 @@ async function startApp(): Promise<void> {
354352
await getStorage();
355353
}
356354

357-
window.startApp = startApp;
355+
globalThis.startApp = startApp;

apps/gpa-calculator/src/scripts/storage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ const gradestorage = "gradestorage";
1212
/** Clears class storage data. */
1313
async function clearData(): Promise<void> {
1414
await storage.removeItem(arraystorage);
15-
location.reload();
15+
globalThis.location.reload();
1616
}
1717

1818
/** Clears all website storage data. */
1919
async function clearAll(): Promise<void> {
2020
await storage.clear();
21-
location.reload();
21+
globalThis.location.reload();
2222
}
2323

2424
/** Sets the storage data. */

apps/phs-map/eslint.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ import { sheriff } from "eslint-config-sheriff";
33
import { defineFlatConfig } from "eslint-define-config";
44

55
/**
6-
* @import {SheriffSettings} from "@sherifforg/types"
6+
* @import {SheriffSettings} from "eslint-config-sheriff"
77
*/
88

99
const sheriffOptions = /** @satisfies {SheriffSettings} */ ({
1010
react: false,
1111
lodash: false,
12+
remeda: false,
1213
next: false,
1314
playwright: false,
1415
jest: false,

apps/phs-map/index.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,34 @@
1313
<title>PHS Map</title>
1414
</head>
1515

16-
<body onload="window.startApp()" class="lightModeBg">
16+
<body onload="globalThis.startApp()" class="lightModeBg">
1717
<header class="w3-container w3-theme w3-padding-16" id="my-header">
1818
<!-- Side Navigation -->
1919
<nav id="my-sidenav" class="sidenav">
2020
<a
2121
aria-label="close navigation"
2222
href="javascript:void(0)"
2323
class="closebtn no-bounce colored-a font-36px"
24-
onclick="window.toggleNav(false)"
24+
onclick="globalThis.toggleNav(false)"
2525
>
2626
<i class="fa-solid fa-xmark"></i>
2727
</a>
2828
<button
2929
id="darkModeButton"
30-
onclick="window.toggleDarkMode()"
30+
onclick="globalThis.toggleDarkMode()"
3131
class="smallbutton w3-button w3-theme"
3232
>
3333
Dark Mode
3434
</button>
3535
<button
3636
class="clearDataButton smallbutton w3-button w3-theme"
37-
onclick="window.clearAll()"
37+
onclick="globalThis.clearAll()"
3838
>
3939
Clear All Site Data
4040
</button>
4141
<div class="no-bounce align-centered"></div>
4242
</nav>
43-
<span onclick="window.toggleNav(true)">
43+
<span onclick="globalThis.toggleNav(true)">
4444
<i class="fa-solid fa-bars"></i>
4545
</span>
4646

@@ -79,13 +79,13 @@ <h2 class="lgreen w3-xxlarge w3-animate-left">Schedules</h2>
7979
/>
8080

8181
<canvas id="my-canvas"></canvas>
82-
<button id="lvl0" onclick="window.lvl(0)">Level 0</button>
83-
<button id="lvl1" onclick="window.lvl(1)">Level 1</button>
84-
<button id="lvl2" onclick="window.lvl(2)">Level 2</button>
82+
<button id="lvl0" onclick="globalThis.lvl(0)">Level 0</button>
83+
<button id="lvl1" onclick="globalThis.lvl(1)">Level 1</button>
84+
<button id="lvl2" onclick="globalThis.lvl(2)">Level 2</button>
8585
<a
8686
id="download"
8787
download="phs-map.jpg"
88-
onclick="window.downloadImg(this);"
88+
onclick="globalThis.downloadImg(this);"
8989
>
9090
Download Current Map
9191
</a>
@@ -98,7 +98,7 @@ <h3>How to use!</h3>
9898
<button
9999
class="lime plusbuttonsml add"
100100
aria-label="add"
101-
onclick="window.addProf()"
101+
onclick="globalThis.addProf()"
102102
>
103103
<i class="fa-solid fa-plus"></i>
104104
</button>
@@ -137,7 +137,7 @@ <h3>How to use!</h3>
137137
<button
138138
class="lime plusbutton add"
139139
aria-label="add"
140-
onclick="window.addProf()"
140+
onclick="globalThis.addProf()"
141141
>
142142
<i class="fa-solid fa-plus"></i>
143143
</button>

apps/phs-map/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,14 @@
4343
},
4444
"devDependencies": {
4545
"@eslint-types/unicorn": "^52.0.0",
46-
"@sherifforg/types": "^4.1.0",
4746
"@total-typescript/ts-reset": "^0.6.1",
4847
"@types/eslint": "~9.6.1",
4948
"@types/pathfinding": "^0.0.9",
5049
"@vite-pwa/assets-generator": "^0.2.6",
5150
"browserslist": "^4.23.3",
5251
"browserslist-to-esbuild": "^2.1.1",
53-
"eslint": "^9.10.0",
54-
"eslint-config-sheriff": "^21.2.0",
52+
"eslint": "^9.13.0",
53+
"eslint-config-sheriff": "^25.0.0",
5554
"eslint-define-config": "^2.1.0",
5655
"fontaine": "^0.5.0",
5756
"lightningcss": "^1.26.0",

0 commit comments

Comments
 (0)