From 34e3321280e76b822b01113392ae875c7c386d06 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 14 Apr 2020 21:42:54 +0200 Subject: [PATCH 1/2] Make lint pass on Windows / for files with CRLF line endings By setting "endOfLine" to "auto". While at it, fix indentation. Signed-off-by: Sebastian Schuberth --- .prettierrc.json | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.prettierrc.json b/.prettierrc.json index bbf4311..32f87e5 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,11 +1,12 @@ { - "printWidth": 80, - "tabWidth": 2, - "useTabs": false, - "semi": false, - "singleQuote": true, - "trailingComma": "none", - "bracketSpacing": false, - "arrowParens": "avoid", - "parser": "typescript" - } \ No newline at end of file + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "semi": false, + "singleQuote": true, + "trailingComma": "none", + "bracketSpacing": false, + "arrowParens": "avoid", + "parser": "typescript", + "endOfLine": "auto" +} From 12970df4d03353fdbca09a5cd6578a3dff3244cf Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 14 Apr 2020 23:10:58 +0200 Subject: [PATCH 2/2] checksums: Remove some superfluous type declarations Signed-off-by: Sebastian Schuberth --- src/checksums.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/checksums.ts b/src/checksums.ts index 5cd51eb..fcb19ea 100644 --- a/src/checksums.ts +++ b/src/checksums.ts @@ -5,9 +5,7 @@ const httpc = new httpm.HttpClient('gradle/wrapper-validation-action') export async function fetchValidChecksums( allowSnapshots: boolean ): Promise { - const all: object[] = await httpGetJsonArray( - 'https://services.gradle.org/versions/all' - ) + const all = await httpGetJsonArray('https://services.gradle.org/versions/all') const withChecksum = all.filter(entry => entry.hasOwnProperty('wrapperChecksumUrl') ) @@ -15,7 +13,7 @@ export async function fetchValidChecksums( // eslint-disable-next-line @typescript-eslint/no-explicit-any (entry: any) => allowSnapshots || !entry.snapshot ) - const checksumUrls: string[] = allowed.map( + const checksumUrls = allowed.map( // eslint-disable-next-line @typescript-eslint/no-explicit-any (entry: any) => entry.wrapperChecksumUrl as string )