File tree Expand file tree Collapse file tree 6 files changed +18
-7
lines changed
Expand file tree Collapse file tree 6 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 2323 "rules": {
2424 "prettier/prettier": "error",
2525 "no-constant-binary-expression": "error",
26+ "array-callback-return": "error",
27+ "no-template-curly-in-string": "error",
28+ "no-promise-executor-return": "error",
29+ "no-constructor-return": "error",
30+ "no-unsafe-optional-chaining": "error",
2631 "block-scoped-var": "warn",
2732 "camelcase": "error",
2833 "constructor-super": "error",
Original file line number Diff line number Diff line change @@ -37,9 +37,9 @@ const ONE_MINUTE_IN_MS = 1000 * 60;
3737function timeout < T > ( p : Promise < T > , duration : number ) : Promise < T > {
3838 return Promise . race ( [
3939 p ,
40- new Promise < never > ( ( resolve , reject ) =>
41- setTimeout ( ( ) => reject ( "timeout" ) , duration )
42- ) ,
40+ new Promise < never > ( ( _resolve , reject ) => {
41+ setTimeout ( ( ) => reject ( "timeout" ) , duration ) ;
42+ } ) ,
4343 ] ) ;
4444}
4545
Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ export async function upload(fileObj) {
2222 console . warn (
2323 `Request to ${ uploadUrl } returned 503, going to retry again in 5 seconds. ${ retries } retries left...`
2424 ) ;
25- await new Promise ( ( resolve ) => setTimeout ( resolve , 5000 ) ) ;
25+ await new Promise ( ( resolve ) => {
26+ setTimeout ( resolve , 5000 ) ;
27+ } ) ;
2628 continue ;
2729 }
2830
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ const getCssRules = createSelector(
8989 }
9090 const cursorRules = cursorSelector
9191 . map ( normalizeCursorSelector )
92- . map ( ( selector ) => {
92+ . map ( ( selector ) : string | null => {
9393 switch ( cursor . type ) {
9494 case "cur" :
9595 return `${ selector } {cursor: url(${ cursor . url } ), auto}` ;
@@ -101,6 +101,8 @@ const getCssRules = createSelector(
101101 return null ;
102102 }
103103 }
104+ default :
105+ return null ;
104106 }
105107 } )
106108 . filter ( Boolean ) ;
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ export const parseViscolors = (text: string): string[] => {
9494 . map ( ( line ) => regex . exec ( line ) )
9595 . filter ( Boolean )
9696 . map ( ( matches ) => ( matches as RegExpExecArray ) . slice ( 1 , 4 ) . join ( "," ) )
97- . map ( ( rgb , i ) => {
97+ . forEach ( ( rgb , i ) => {
9898 colors [ i ] = `rgb(${ rgb } )` ;
9999 } ) ;
100100 return colors ;
Original file line number Diff line number Diff line change @@ -20,7 +20,9 @@ import puppeteer from "puppeteer";
2020 return ;
2121 }
2222 // TODO: Wait for node to be ready
23- await new Promise ( ( resolve ) => setTimeout ( resolve , 500 ) ) ;
23+ await new Promise ( ( resolve ) => {
24+ setTimeout ( resolve , 500 ) ;
25+ } ) ;
2426 try {
2527 const css : string = await page . evaluate (
2628 ( ) => document . getElementById ( "webamp-skin" ) ?. innerText || ""
You can’t perform that action at this time.
0 commit comments