Skip to content

Commit f291677

Browse files
committed
Fixed ESLint issues in source code
1 parent 90f8ba0 commit f291677

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

src/bus.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface Bus {
2727
}
2828

2929
export let createBus = (): Bus => {
30-
let allSubscribers: { [index: string]: Callback[] } = {};
30+
let allSubscribers: Record<string, Callback[]> = {};
3131
let bus: Bus = {
3232
signal: (eventType) => {
3333
let subscribers = allSubscribers[eventType];

src/commands/init.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ insert_final_newline = true`,
115115

116116
let templateData = {
117117
library,
118-
// eslint-disable-next-line @typescript-eslint/no-var-requires
118+
// eslint-disable-next-line @typescript-eslint/no-require-imports
119119
typescriptAssistantVersion: require("../../package.json").version,
120120
};
121121

src/dependency-injector.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export let createDependencyInjector = (): (<T>(
4242
Object.defineProperty(dependencies, "server", {
4343
get: () => {
4444
if (!server) {
45-
// eslint-disable-next-line @typescript-eslint/no-var-requires
45+
// eslint-disable-next-line @typescript-eslint/no-require-imports
4646
server = inject(require("./server").createServer);
4747
}
4848
return server;

src/index.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ yargsModule.command(
148148
compileLimit: {
149149
describe: "Limit the number of concurrent compilations",
150150
number: true,
151-
default: 2
152-
}
151+
default: 2,
152+
},
153153
},
154154
(yargs) => {
155155
inject(createCICommand)
@@ -158,7 +158,7 @@ yargsModule.command(
158158
format: yargs.format,
159159
coverage: yargs.coverage,
160160
disabledProjects: yargs.disable,
161-
compileLimit: yargs.compileLimit
161+
compileLimit: yargs.compileLimit,
162162
})
163163
.then(failIfUnsuccessful, onFailure);
164164
}
@@ -254,4 +254,5 @@ yargsModule.command(
254254
}
255255
);
256256

257+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
257258
yargsModule.strict().argv;

src/taskrunner.ts

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export function createDefaultTaskRunner(): TaskRunner {
9090
if (code === 0 || code === null) {
9191
resolve();
9292
} else {
93+
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
9394
reject(`Process exited with code ${code}`);
9495
}
9596
});

0 commit comments

Comments
 (0)