chore(deps-dev): bump eslint from 7.32.0 to 8.2.0, run [weblate steam oreversion orespongeversions gitlabcoverage] (#7235)
* chore(deps-dev): bump eslint from 7.32.0 to 8.2.0 Bumps [eslint](https://github.com/eslint/eslint) from 7.32.0 to 8.2.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v7.32.0...v8.2.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * deps: update ts-eslint plugins * chore: apply linter fixes Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Caleb Cartwright <caleb.cartwright@outlook.com> Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
This commit is contained in:
2072
package-lock.json
generated
2072
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -155,8 +155,8 @@
|
||||
"@types/react-modal": "^3.13.1",
|
||||
"@types/react-select": "^4.0.17",
|
||||
"@types/styled-components": "5.1.15",
|
||||
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
||||
"@typescript-eslint/parser": "^4.32.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.3.0",
|
||||
"@typescript-eslint/parser": "^5.3.0",
|
||||
"babel-plugin-inline-react-svg": "^2.0.1",
|
||||
"babel-plugin-istanbul": "^6.1.1",
|
||||
"babel-preset-gatsby": "^2.1.0",
|
||||
@@ -173,7 +173,7 @@
|
||||
"danger": "^10.7.1",
|
||||
"danger-plugin-no-test-shortcuts": "^2.0.0",
|
||||
"deepmerge": "^4.2.2",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint": "^8.2.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-config-standard": "^16.0.3",
|
||||
"eslint-config-standard-jsx": "^10.0.0",
|
||||
|
||||
@@ -95,13 +95,7 @@ export default class GitlabCoverage extends BaseSvgScrapingService {
|
||||
}
|
||||
}
|
||||
|
||||
async fetch({
|
||||
user,
|
||||
repo,
|
||||
branch,
|
||||
gitlab_url: baseUrl = 'https://gitlab.com',
|
||||
job_name: jobName,
|
||||
}) {
|
||||
async fetch({ user, repo, branch, baseUrl = 'https://gitlab.com', jobName }) {
|
||||
// Since the URL doesn't return a usable value when an invalid job name is specified,
|
||||
// it is recommended to not use the query param at all if not required
|
||||
jobName = jobName ? `?job=${jobName}` : ''
|
||||
@@ -124,13 +118,16 @@ export default class GitlabCoverage extends BaseSvgScrapingService {
|
||||
return Number(coverage.slice(0, -1))
|
||||
}
|
||||
|
||||
async handle({ user, repo, branch }, { gitlab_url, job_name }) {
|
||||
async handle(
|
||||
{ user, repo, branch },
|
||||
{ gitlab_url: baseUrl, job_name: jobName }
|
||||
) {
|
||||
const { message: coverage } = await this.fetch({
|
||||
user,
|
||||
repo,
|
||||
branch,
|
||||
gitlab_url,
|
||||
job_name,
|
||||
baseUrl,
|
||||
jobName,
|
||||
})
|
||||
return this.constructor.render({
|
||||
coverage: this.constructor.transform({ coverage }),
|
||||
|
||||
@@ -32,9 +32,9 @@ export default class OreSpongeVersions extends BaseOreService {
|
||||
}
|
||||
|
||||
transform({ data }) {
|
||||
const { promoted_versions } = data
|
||||
const { promoted_versions: promotedVersions } = data
|
||||
return {
|
||||
versions: promoted_versions
|
||||
versions: promotedVersions
|
||||
.reduce((acc, { tags }) => acc.concat(tags), [])
|
||||
.filter(({ name }) => name.toLowerCase() === 'sponge')
|
||||
.map(({ display_data: displayData }) => displayData)
|
||||
|
||||
@@ -33,12 +33,10 @@ export default class OreVersion extends BaseOreService {
|
||||
}
|
||||
|
||||
transform({ data }) {
|
||||
const { promoted_versions } = data
|
||||
const { promoted_versions: promotedVersions } = data
|
||||
return {
|
||||
version:
|
||||
promoted_versions.length === 0
|
||||
? undefined
|
||||
: promoted_versions[0].version,
|
||||
promotedVersions.length === 0 ? undefined : promotedVersions[0].version,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -358,8 +358,8 @@ class SteamFileDownloads extends SteamFileService {
|
||||
|
||||
static defaultBadgeData = { label: 'downloads' }
|
||||
|
||||
async onRequest({ response: { lifetime_subscriptions } }) {
|
||||
return renderDownloadsBadge({ downloads: lifetime_subscriptions })
|
||||
async onRequest({ response: { lifetime_subscriptions: downloads } }) {
|
||||
return renderDownloadsBadge({ downloads })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ describe('Text formatters', function () {
|
||||
|
||||
test(metric, () => {
|
||||
/* eslint-disable no-loss-of-precision */
|
||||
/* eslint-disable @typescript-eslint/no-loss-of-precision */
|
||||
given(999).expect('999')
|
||||
given(1000).expect('1k')
|
||||
given(1100).expect('1.1k')
|
||||
|
||||
@@ -58,7 +58,10 @@ export default class WeblateProjectTranslatedPercentage extends WeblateBase {
|
||||
}
|
||||
|
||||
async handle({ project }, { server }) {
|
||||
const { translated_percent } = await this.fetch({ project, server })
|
||||
return this.constructor.render({ translatedPercent: translated_percent })
|
||||
const { translated_percent: translatedPercent } = await this.fetch({
|
||||
project,
|
||||
server,
|
||||
})
|
||||
return this.constructor.render({ translatedPercent })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user