This repository was archived by the owner on Jul 10, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +27
-19
lines changed Expand file tree Collapse file tree 8 files changed +27
-19
lines changed Original file line number Diff line number Diff line change 1
- // @ts -check
2
1
import { sheriff } from "eslint-config-sheriff" ;
3
2
import { defineFlatConfig } from "eslint-define-config" ;
4
3
4
+ /**
5
+ * @type import("@sherifforg/types").SheriffSettings
6
+ */
5
7
const sheriffOptions = {
6
8
react : false ,
7
9
lodash : false ,
8
10
next : false ,
9
11
playwright : false ,
10
12
jest : false ,
11
13
vitest : false ,
14
+ // astro: false, // THIS DOESN'T DO ANYTHING!
12
15
pathsOveriddes : {
13
16
tsconfigLocation : [
14
17
"./tsconfig.json" ,
15
18
"./tsconfig.sw.json" ,
16
19
"./tsconfig.eslint.json" ,
17
20
] ,
18
- ignores : [
19
- "**/node_modules/**" ,
20
- "**/dist/**" ,
21
- "**/dev-dist/**" ,
22
- "**/build/**" ,
23
- "**/.yarn/**" ,
24
- "**/.pnp.*" ,
25
- ] ,
26
21
} ,
27
22
} ;
28
23
24
+ /**
25
+ * @type import("eslint-define-config").FlatESLintConfig[]
26
+ */
27
+ // @ts -expect-error: null and undefined are different.
28
+ const sheriffRules = sheriff ( sheriffOptions ) ;
29
+
29
30
export default defineFlatConfig ( [
30
- ...sheriff ( sheriffOptions ) ,
31
+ ...sheriffRules ,
31
32
{
32
33
files : [ "**/*.ts" ] ,
33
34
rules : {
@@ -47,6 +48,10 @@ export default defineFlatConfig([
47
48
{ "ts-expect-error" : true , "ts-check" : false } ,
48
49
] ,
49
50
"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" ,
50
55
} ,
51
56
} ,
52
57
] ) ;
Original file line number Diff line number Diff line change 30
30
"@fortawesome/free-solid-svg-icons" : " ^6.5.1" ,
31
31
"idb-keyval" : " ^6.2.1" ,
32
32
"pathfinding" : " ^0.4.18" ,
33
- "turbo" : " ^1.12.0" ,
34
33
"unstorage" : " ^1.10.1" ,
35
34
"workbox-build" : " ^7.0.0" ,
36
35
"workbox-core" : " ^7.0.0" ,
41
40
"devDependencies" : {
42
41
"@eslint-types/typescript-eslint" : " ^6.21.0" ,
43
42
"@eslint-types/unicorn" : " ^51.0.1" ,
43
+ "@sherifforg/types" : " ^3.0.0" ,
44
44
"@types/bun" : " ^1.0.5" ,
45
45
"@types/eslint" : " ^8.56.2" ,
46
46
"@types/pathfinding" : " ^0.0.9" ,
51
51
"eslint-define-config" : " ^2.1.0" ,
52
52
"lightningcss" : " ^1.23.0" ,
53
53
"prettier" : " 3.2.5" ,
54
+ "turbo" : " ^1.12.4" ,
54
55
"typescript" : " ^5.3.3" ,
55
56
"vite" : " ^5.1.1" ,
56
57
"vite-plugin-pwa" : " ^0.18.1" ,
Original file line number Diff line number Diff line change @@ -341,15 +341,15 @@ async function locateCourses(profNum: number): Promise<void> {
341
341
profiles [ profNum ] = [ ] ;
342
342
profiles [ 0 ] = profiles [ 0 ] ?? [ undefined , "" ] ;
343
343
344
- profiles [ 0 ] ! [ profNum ] = (
344
+ profiles [ 0 ] [ profNum ] = (
345
345
document . getElementById ( `nameProf${ profNum } ` ) as HTMLInputElement
346
346
) . value ;
347
347
for ( const [ i ] of document . querySelectorAll ( `.prof${ profNum } ` ) . entries ( ) ) {
348
348
profiles [ profNum ] ! [ i ] = [ ] ;
349
- ( profiles [ profNum ] ! [ i ] as string [ ] ) ! [ 0 ] = (
349
+ ( profiles [ profNum ] ! [ i ] as string [ ] ) [ 0 ] = (
350
350
document . getElementById ( `rmnum${ i + 1 } ${ prof } txt` ) as HTMLInputElement
351
351
) . value ;
352
- ( profiles [ profNum ] ! [ i ] as string [ ] ) ! [ 1 ] = (
352
+ ( profiles [ profNum ] ! [ i ] as string [ ] ) [ 1 ] = (
353
353
document . getElementById ( `cl${ i + 1 } ${ prof } txt` ) as HTMLInputElement
354
354
) . value ;
355
355
}
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ import { precacheAndRoute } from "workbox-precaching";
3
3
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
4
4
// @ts -expect-error: __WB_MANIFEST is a placeholder that workbox-precaching will inject at compile time.
5
5
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
6
- precacheAndRoute ( self . __WB_MANIFEST || [ ] ) ;
6
+ precacheAndRoute ( self . __WB_MANIFEST ?? [ ] ) ;
Original file line number Diff line number Diff line change 2
2
"extends" : " ./tsconfig.json" ,
3
3
"include" : [" vite.config.ts" , " eslint.config.js" ],
4
4
"compilerOptions" : {
5
- "tsBuildInfoFile" : " node_modules/.cache/tsbuildinfo.extra.json"
5
+ "tsBuildInfoFile" : " node_modules/.cache/tsbuildinfo.extra.json" ,
6
+ "allowJs" : true ,
7
+ "checkJs" : true
6
8
}
7
9
}
Original file line number Diff line number Diff line change 22
22
},
23
23
"lint" : {
24
24
"inputs" : [
25
- " src/** " ,
26
- " vite .config.ts "
25
+ " **/*.ts " ,
26
+ " eslint .config.js "
27
27
]
28
28
},
29
29
"typecheck" : {
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export default defineConfig({
19
19
} ,
20
20
} ,
21
21
target : browserslistToEsbuild ( browsersList ) ,
22
- cssMinify : "lightningcss" ,
22
+ // cssMinify: "lightningcss",
23
23
} ,
24
24
css : {
25
25
transformer : "lightningcss" ,
You can’t perform that action at this time.
0 commit comments