Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
FUSETOOLS2-2304: Change code to match new rules
Browse files Browse the repository at this point in the history
  • Loading branch information
pospisilf committed Apr 29, 2024
1 parent 0edc6ff commit b8dd265
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
13 changes: 10 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,21 @@
"error",
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE"]
"format": ["camelCase", "UPPER_CASE"],
"leadingUnderscore": "allow"
}
],
"@stylistic/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"no-throw-literal": "warn",
"@typescript-eslint/no-unused-vars":[
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-floating-promises": "warn",
"import/no-extraneous-dependencies": [
"error",
Expand Down
5 changes: 2 additions & 3 deletions src/conditions/Repeat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class RepeatManager {
}

abortAll(): void {
for (const [index, repeat] of this._repeats.entries()) {
for (const [_index, repeat] of this._repeats.entries()) {
repeat.abort(undefined);
this.remove(repeat);
}
Expand Down Expand Up @@ -342,8 +342,7 @@ export class Repeat<T> {
}
else if (this._usingExplicitLoopSignaling === false || this._finishedLoop) {
if (this.options?.ignoreLoopError) {
// @ts-expect-error
// output will be ignored
// @ts-expect-error: output will be ignored
this.resolve(undefined);
}
else {
Expand Down
3 changes: 1 addition & 2 deletions src/conditions/TimeoutPromise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,7 @@ class TimeoutPromise<T> extends Promise<T> {
*/
static createFrom<T>(promise: Promise<T>, timeout?: number, options?: TimeoutPromiseOptions): TimeoutPromise<T> {
return new TimeoutPromise<T>((resolve, reject) => {
promise.then(resolve);
promise.catch(reject);
promise.then(resolve).catch(reject);
}, timeout, options);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/utils/Errors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { error } from "vscode-extension-tester";

// eslint-disable-next-line @typescript-eslint/ban-types
export type ErrorType = Function;

/**
Expand Down

0 comments on commit b8dd265

Please sign in to comment.