Skip to content

Commit 8482d16

Browse files
committed
fix: fixed linting
1 parent c9dd52f commit 8482d16

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

Diff for: .xo-config.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ module.exports = {
88
'unicorn/catch-error-name': 'off',
99
'unicorn/require-post-message-target-origin': 'off',
1010
'unicorn/prefer-node-protocol': 'warn',
11-
'unicorn/prefer-top-level-await': 'warn',
12-
'unicorn/prefer-logical-operator-over-ternary': 'warn'
11+
'unicorn/prefer-top-level-await': 'warn'
1312
},
1413
overrides: [
1514
{

Diff for: types/index.d.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Definitions by: Taylor Schley <https://github.com/shadowgate15>
22

33
import { EventEmitter } from 'node:events';
4-
import { WorkerOptions, Worker } from 'node:worker_threads';
5-
import { Timeout, Interval } from 'safe-timers';
4+
import type { WorkerOptions, Worker } from 'node:worker_threads';
5+
import type { Timeout, Interval } from 'safe-timers';
66

77
export = Bree;
88

@@ -68,7 +68,7 @@ declare class Bree extends EventEmitter {
6868
}
6969

7070
declare namespace Bree {
71-
interface Job {
71+
type Job = {
7272
name: string;
7373
path: string | (() => void);
7474
timeout: number | string | boolean;
@@ -81,11 +81,11 @@ declare namespace Bree {
8181
worker?: Partial<WorkerOptions>;
8282
outputWorkerMetadata?: boolean;
8383
timezone?: string;
84-
}
84+
};
8585

8686
type JobOptions = Required<Pick<Job, 'name'>> & Partial<Omit<Job, 'name'>>;
8787

88-
interface BreeConfigs {
88+
type BreeConfigs = {
8989
logger: BreeLogger | boolean;
9090
root: string | boolean;
9191
silenceRootCheckError: boolean;
@@ -105,7 +105,7 @@ declare namespace Bree {
105105
errorHandler?: (error: any, workerMetadata: any) => void;
106106
workerMessageHandler?: (message: any, workerMetadata: any) => void;
107107
outputWorkerMetadata: boolean;
108-
}
108+
};
109109

110110
type BreeOptions = Partial<Omit<BreeConfigs, 'jobs'>> & {
111111
jobs?: Array<string | (() => void) | JobOptions>;
@@ -115,9 +115,9 @@ declare namespace Bree {
115115

116116
function extend<T = unknown>(plugin: PluginFunc<T>, options?: T): Bree;
117117

118-
interface BreeLogger {
118+
type BreeLogger = {
119119
info: (...args: any[]) => any;
120120
warn: (...args: any[]) => any;
121121
error: (...args: any[]) => any;
122-
}
122+
};
123123
}

0 commit comments

Comments
 (0)