Skip to content

Commit

Permalink
🚨 pnpm lint:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NatoBoram committed May 24, 2024
1 parent e9502d0 commit 2179cc7
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 20 deletions.
25 changes: 12 additions & 13 deletions src/version3/issueComments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,18 @@ export class IssueComments {
*/
async addComment<T = Models.Comment>(parameters: Parameters.AddComment, callback?: never): Promise<T>;
async addComment<T = Models.Comment>(parameters: Parameters.AddComment, callback?: Callback<T>): Promise<void | T> {
const body =
typeof parameters.comment === 'string'
? {
type: 'doc',
version: 1,
content: [
{
type: 'paragraph',
content: [{ type: 'text', text: parameters.comment }],
},
],
}
: parameters.comment;
const body = typeof parameters.comment === 'string'
? {
type: 'doc',
version: 1,
content: [
{
type: 'paragraph',
content: [{ type: 'text', text: parameters.comment }],
},
],
}
: parameters.comment;

const config: RequestConfig = {
url: `/rest/api/3/issue/${parameters.issueIdOrKey}/comment`,
Expand Down
4 changes: 3 additions & 1 deletion src/version3/parameters/createIssue.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import type { Document, IssueUpdateDetails, Project, TimeTrackingDetails } from '../models/index.js';
import type {
Document, IssueUpdateDetails, Project, TimeTrackingDetails,
} from '../models/index.js';

export interface CreateIssue extends Omit<IssueUpdateDetails, 'fields'> {
/**
Expand Down
4 changes: 3 additions & 1 deletion tests/integration/agile/sprint.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { afterAll, beforeAll, test } from 'vitest';
import { AgileModels } from '../../../src/index.js';
import { Constants } from '../constants.js';
import { createAgileProject, deleteAgileProject, getAgileClient, getVersion3Client } from '../utils/index.js';
import {
createAgileProject, deleteAgileProject, getAgileClient, getVersion3Client,
} from '../utils/index.js';

const client = getAgileClient();

Expand Down
4 changes: 3 additions & 1 deletion tests/integration/version2/issueVotes.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { afterAll, beforeAll, test } from 'vitest';
import type { CreatedIssue } from '../../../src/version2/models/index.js';
import { cleanupEnvironment, createIssue, getVersion2Client, prepareEnvironment } from '../utils/index.js';
import {
cleanupEnvironment, createIssue, getVersion2Client, prepareEnvironment,
} from '../utils/index.js';

const client = getVersion2Client();
let createdIssue: CreatedIssue;
Expand Down
4 changes: 3 additions & 1 deletion tests/integration/version3/issueVotes.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { afterAll, beforeAll, test } from 'vitest';
import type { CreatedIssue } from '../../../src/version3/models/index.js';
import { cleanupEnvironment, createIssue, getVersion3Client, prepareEnvironment } from '../utils/index.js';
import {
cleanupEnvironment, createIssue, getVersion3Client, prepareEnvironment,
} from '../utils/index.js';

const client = getVersion3Client();
let createdIssue: CreatedIssue;
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/clients/baseClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ test("shouldn't display error message for correct host urls", ({ expect }) => {
});

test('should display error message for incorrect host url', ({ expect }) => {
const errorMessage =
"Couldn't parse the host URL. Perhaps you forgot to add 'http://' or 'https://' at the beginning of the URL?";
const errorMessage = "Couldn't parse the host URL. Perhaps you forgot to add 'http://' or 'https://' at the beginning of the URL?";

expect(() => new BaseClient({ host: '' })).toThrowError(errorMessage);
expect(() => new BaseClient({ host: 'localhost' })).toThrowError(errorMessage);
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/createClient.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { test } from 'vitest';
import { AgileClient, BaseClient, ClientType, createClient, Version2Client, Version3Client } from '../../src/index.js';
import {
AgileClient, BaseClient, ClientType, createClient, Version2Client, Version3Client,
} from '../../src/index.js';

const defaultConfig = { host: 'http://localhost' };

Expand Down

0 comments on commit 2179cc7

Please sign in to comment.