Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Commit b6d81cd

Browse files
committed
fix: sync with gpa
1 parent 3d583ef commit b6d81cd

File tree

8 files changed

+27
-19
lines changed

8 files changed

+27
-19
lines changed

bun.lockb

1.38 KB
Binary file not shown.

eslint.config.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
1-
// @ts-check
21
import { sheriff } from "eslint-config-sheriff";
32
import { defineFlatConfig } from "eslint-define-config";
43

4+
/**
5+
* @type import("@sherifforg/types").SheriffSettings
6+
*/
57
const sheriffOptions = {
68
react: false,
79
lodash: false,
810
next: false,
911
playwright: false,
1012
jest: false,
1113
vitest: false,
14+
// astro: false, // THIS DOESN'T DO ANYTHING!
1215
pathsOveriddes: {
1316
tsconfigLocation: [
1417
"./tsconfig.json",
1518
"./tsconfig.sw.json",
1619
"./tsconfig.eslint.json",
1720
],
18-
ignores: [
19-
"**/node_modules/**",
20-
"**/dist/**",
21-
"**/dev-dist/**",
22-
"**/build/**",
23-
"**/.yarn/**",
24-
"**/.pnp.*",
25-
],
2621
},
2722
};
2823

24+
/**
25+
* @type import("eslint-define-config").FlatESLintConfig[]
26+
*/
27+
// @ts-expect-error: null and undefined are different.
28+
const sheriffRules = sheriff(sheriffOptions);
29+
2930
export default defineFlatConfig([
30-
...sheriff(sheriffOptions),
31+
...sheriffRules,
3132
{
3233
files: ["**/*.ts"],
3334
rules: {
@@ -47,6 +48,10 @@ export default defineFlatConfig([
4748
{ "ts-expect-error": true, "ts-check": false },
4849
],
4950
"import/no-unresolved": [2, { ignore: ["^virtual:"] }],
51+
"@typescript-eslint/prefer-function-type": "warn",
52+
"@typescript-eslint/explicit-function-return-type": "warn",
53+
"@typescript-eslint/promise-function-async": "warn",
54+
"@typescript-eslint/strict-boolean-expressions": "warn",
5055
},
5156
},
5257
]);

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"@fortawesome/free-solid-svg-icons": "^6.5.1",
3131
"idb-keyval": "^6.2.1",
3232
"pathfinding": "^0.4.18",
33-
"turbo": "^1.12.0",
3433
"unstorage": "^1.10.1",
3534
"workbox-build": "^7.0.0",
3635
"workbox-core": "^7.0.0",
@@ -41,6 +40,7 @@
4140
"devDependencies": {
4241
"@eslint-types/typescript-eslint": "^6.21.0",
4342
"@eslint-types/unicorn": "^51.0.1",
43+
"@sherifforg/types": "^3.0.0",
4444
"@types/bun": "^1.0.5",
4545
"@types/eslint": "^8.56.2",
4646
"@types/pathfinding": "^0.0.9",
@@ -51,6 +51,7 @@
5151
"eslint-define-config": "^2.1.0",
5252
"lightningcss": "^1.23.0",
5353
"prettier": "3.2.5",
54+
"turbo": "^1.12.4",
5455
"typescript": "^5.3.3",
5556
"vite": "^5.1.1",
5657
"vite-plugin-pwa": "^0.18.1",

src/script.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,15 +341,15 @@ async function locateCourses(profNum: number): Promise<void> {
341341
profiles[profNum] = [];
342342
profiles[0] = profiles[0] ?? [undefined, ""];
343343

344-
profiles[0]![profNum] = (
344+
profiles[0][profNum] = (
345345
document.getElementById(`nameProf${profNum}`) as HTMLInputElement
346346
).value;
347347
for (const [i] of document.querySelectorAll(`.prof${profNum}`).entries()) {
348348
profiles[profNum]![i] = [];
349-
(profiles[profNum]![i] as string[])![0] = (
349+
(profiles[profNum]![i] as string[])[0] = (
350350
document.getElementById(`rmnum${i + 1}${prof}txt`) as HTMLInputElement
351351
).value;
352-
(profiles[profNum]![i] as string[])![1] = (
352+
(profiles[profNum]![i] as string[])[1] = (
353353
document.getElementById(`cl${i + 1}${prof}txt`) as HTMLInputElement
354354
).value;
355355
}

src/sw.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ import { precacheAndRoute } from "workbox-precaching";
33
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
44
// @ts-expect-error: __WB_MANIFEST is a placeholder that workbox-precaching will inject at compile time.
55
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
6-
precacheAndRoute(self.__WB_MANIFEST || []);
6+
precacheAndRoute(self.__WB_MANIFEST ?? []);

tsconfig.eslint.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"extends": "./tsconfig.json",
33
"include": ["vite.config.ts", "eslint.config.js"],
44
"compilerOptions": {
5-
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.extra.json"
5+
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.extra.json",
6+
"allowJs": true,
7+
"checkJs": true
68
}
79
}

turbo.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
},
2323
"lint": {
2424
"inputs": [
25-
"src/**",
26-
"vite.config.ts"
25+
"**/*.ts",
26+
"eslint.config.js"
2727
]
2828
},
2929
"typecheck": {

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default defineConfig({
1919
},
2020
},
2121
target: browserslistToEsbuild(browsersList),
22-
cssMinify: "lightningcss",
22+
// cssMinify: "lightningcss",
2323
},
2424
css: {
2525
transformer: "lightningcss",

0 commit comments

Comments
 (0)