Skip to content

Commit

Permalink
Fixed ESLint issues in source code
Browse files Browse the repository at this point in the history
  • Loading branch information
jvanoostveen committed Sep 19, 2024
1 parent 90f8ba0 commit f291677
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/bus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface Bus {
}

export let createBus = (): Bus => {
let allSubscribers: { [index: string]: Callback[] } = {};
let allSubscribers: Record<string, Callback[]> = {};
let bus: Bus = {
signal: (eventType) => {
let subscribers = allSubscribers[eventType];
Expand Down
2 changes: 1 addition & 1 deletion src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ insert_final_newline = true`,

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

Expand Down
2 changes: 1 addition & 1 deletion src/dependency-injector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export let createDependencyInjector = (): (<T>(
Object.defineProperty(dependencies, "server", {
get: () => {
if (!server) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-require-imports
server = inject(require("./server").createServer);
}
return server;
Expand Down
7 changes: 4 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ yargsModule.command(
compileLimit: {
describe: "Limit the number of concurrent compilations",
number: true,
default: 2
}
default: 2,
},
},
(yargs) => {
inject(createCICommand)
Expand All @@ -158,7 +158,7 @@ yargsModule.command(
format: yargs.format,
coverage: yargs.coverage,
disabledProjects: yargs.disable,
compileLimit: yargs.compileLimit
compileLimit: yargs.compileLimit,
})
.then(failIfUnsuccessful, onFailure);
}
Expand Down Expand Up @@ -254,4 +254,5 @@ yargsModule.command(
}
);

// eslint-disable-next-line @typescript-eslint/no-unused-expressions
yargsModule.strict().argv;
1 change: 1 addition & 0 deletions src/taskrunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export function createDefaultTaskRunner(): TaskRunner {
if (code === 0 || code === null) {
resolve();
} else {
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
reject(`Process exited with code ${code}`);
}
});
Expand Down

0 comments on commit f291677

Please sign in to comment.