Merge pull request #27 from sschuberth/minor-improvements

Minor improvements
This commit is contained in:
Paul Merlin 2020-09-22 17:37:04 +02:00 committed by GitHub
commit e7b6c4bcaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 14 deletions

View file

@ -1,11 +1,12 @@
{ {
"printWidth": 80, "printWidth": 80,
"tabWidth": 2, "tabWidth": 2,
"useTabs": false, "useTabs": false,
"semi": false, "semi": false,
"singleQuote": true, "singleQuote": true,
"trailingComma": "none", "trailingComma": "none",
"bracketSpacing": false, "bracketSpacing": false,
"arrowParens": "avoid", "arrowParens": "avoid",
"parser": "typescript" "parser": "typescript",
} "endOfLine": "auto"
}

View file

@ -5,9 +5,7 @@ const httpc = new httpm.HttpClient('gradle/wrapper-validation-action')
export async function fetchValidChecksums( export async function fetchValidChecksums(
allowSnapshots: boolean allowSnapshots: boolean
): Promise<string[]> { ): Promise<string[]> {
const all: object[] = await httpGetJsonArray( const all = await httpGetJsonArray('https://services.gradle.org/versions/all')
'https://services.gradle.org/versions/all'
)
const withChecksum = all.filter(entry => const withChecksum = all.filter(entry =>
entry.hasOwnProperty('wrapperChecksumUrl') entry.hasOwnProperty('wrapperChecksumUrl')
) )
@ -15,7 +13,7 @@ export async function fetchValidChecksums(
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
(entry: any) => allowSnapshots || !entry.snapshot (entry: any) => allowSnapshots || !entry.snapshot
) )
const checksumUrls: string[] = allowed.map( const checksumUrls = allowed.map(
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
(entry: any) => entry.wrapperChecksumUrl as string (entry: any) => entry.wrapperChecksumUrl as string
) )