Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps-dev): bump eslint from 7.32.0 to 8.2.0, run [weblate steam oreversion orespongeversions gitlabcoverage] #7235

Merged
merged 4 commits into from
Nov 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,062 changes: 1,561 additions & 501 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
17 changes: 7 additions & 10 deletions services/gitlab/gitlab-coverage.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}` : ''
Expand All @@ -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 }),
Expand Down
4 changes: 2 additions & 2 deletions services/ore/ore-sponge-versions.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 2 additions & 4 deletions services/ore/ore-version.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}

Expand Down
4 changes: 2 additions & 2 deletions services/steam/steam-workshop.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
}
}

Expand Down
1 change: 1 addition & 0 deletions services/text-formatters.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
}
}