Skip to content

Commit

Permalink
chore(deps): update dependency @zendeskgarden/eslint-config to v45 (#254
Browse files Browse the repository at this point in the history
)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Zempel <[email protected]>
  • Loading branch information
renovate[bot] and jzempel authored Dec 18, 2024
1 parent c058ef7 commit 972d8a6
Show file tree
Hide file tree
Showing 9 changed files with 987 additions and 1,964 deletions.
2,910 changes: 964 additions & 1,946 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@types/lodash": "4.17.13",
"@types/node": "22.10.1",
"@types/pluralize": "0.0.33",
"@zendeskgarden/eslint-config": "44.0.1",
"@zendeskgarden/eslint-config": "45.0.0",
"commit-and-tag-version": "12.5.0",
"eslint": "9.14.0",
"eslint-config-prettier": "9.1.0",
Expand Down
9 changes: 3 additions & 6 deletions src/cmd/docgen/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const execute = async (
ignore: args.ignore || DEFAULT_IGNORE
};

// eslint-disable-next-line @typescript-eslint/await-thenable
for await (const path of Array.isArray(args.paths) ? args.paths : [args.paths]) {
const resolvedPath = resolve(path);
/* eslint-disable-next-line @typescript-eslint/unbound-method */
Expand Down Expand Up @@ -158,12 +159,8 @@ export default (spinner: Ora): Command => {
return command
.description('generate component documentation')
.argument('<paths...>', 'one or more component paths')
.option(
'-x --extensions <extensions...>',
'file extensions to consider',
DEFAULT_EXTENSIONS as unknown as string
)
.option('-i --ignore <ignore...>', 'paths to ignore', DEFAULT_IGNORE as unknown as string)
.option('-x --extensions <extensions...>', 'file extensions to consider', DEFAULT_EXTENSIONS)
.option('-i --ignore <ignore...>', 'paths to ignore', DEFAULT_IGNORE)
.option('--pretty', 'pretty-print JSON')
.action(async (paths: string[]) => {
try {
Expand Down
4 changes: 2 additions & 2 deletions src/github/branch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ export default (spinner: Ora): Command => {
return command
.description('output GitHub branch name for the repo')
.arguments('[path]')
.action(async path => {
.action(async (path: string) => {
try {
spinner.start();

const branch = await execute(path as string, spinner);
const branch = await execute(path, spinner);

if (branch) {
handleSuccessMessage(branch, spinner);
Expand Down
1 change: 1 addition & 0 deletions src/github/commit/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const execute = async (args: IGitHubCommitArgs = {}): Promise<string | un
retVal = commits.data[0].sha || undefined;
}
} catch (error) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
if ((error as RequestError).status !== 404) {
handleErrorMessage(error, 'github-commit', args.spinner);

Expand Down
3 changes: 2 additions & 1 deletion src/github/deploy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const execute = async (args: IGitHubDeployArgs): Promise<string | undefin
await github.repos.createDeploymentStatus({
owner: repository.owner,
repo: repository.repo,
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
/* eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-type-assertion */
deployment_id: (deployment.data as any).id, // HACK for types broken in oktokit 17.9.1
state: error ? 'error' : 'success',
environment_url: typeof result === 'object' ? result.url : result,
Expand All @@ -80,6 +80,7 @@ export const execute = async (args: IGitHubDeployArgs): Promise<string | undefin
});

if (error) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
throw error as Error;
}

Expand Down
12 changes: 6 additions & 6 deletions src/github/repository/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ type RETVAL = {
export const execute = async (path?: string, spinner?: Ora): Promise<RETVAL | undefined> => {
let retVal: RETVAL | undefined;

if (process.env.TRAVIS_REPO_SLUG) {
const [owner, repo] = process.env.TRAVIS_REPO_SLUG.split('/') as [string, string];
if (process.env.GITHUB_REPOSITORY) {
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');

retVal = { owner, repo };
} else if (process.env.GITHUB_ACTIONS) {
const [owner, repo] = process.env.GITHUB_REPOSITORY!.split('/') as [string, string];
} else if (process.env.TRAVIS_REPO_SLUG) {
const [owner, repo] = process.env.TRAVIS_REPO_SLUG.split('/');

retVal = { owner, repo };
} else if (process.env.CIRCLECI) {
Expand Down Expand Up @@ -79,11 +79,11 @@ export default (spinner: Ora): Command => {
return command
.description('output GitHub repository name for the repo')
.arguments('[path]')
.action(async path => {
.action(async (path: string) => {
try {
spinner.start();

const repository = await execute(path as string, spinner);
const repository = await execute(path, spinner);

if (repository) {
handleSuccessMessage(`${repository.owner}/${repository.repo}`, spinner);
Expand Down
1 change: 1 addition & 0 deletions src/lerna/changelog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const execute = async (args: ILernaChangelogArgs = {}): Promise<string |
});
} catch (error) {
handleErrorMessage(
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
(error as Error).message ? (error as Error).message : error,
'lerna-changelog',
args.spinner
Expand Down
9 changes: 7 additions & 2 deletions src/netlify/bandwidth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@ export const execute = async (args: INetlifyBandwidthArgs = {}): Promise<RETVAL
response = await fetch(url, { headers: client.defaultHeaders });

if (response.ok) {
const data = await response.json();
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
const data = (await response.json()) as {
included: number;
additional: number;
used: number;
};

retVal = {
available: (data.included as number) + (data.additional as number),
available: data.included + data.additional,
used: data.used
};
} else {
Expand Down

0 comments on commit 972d8a6

Please sign in to comment.