Skip to content

Commit eba94c5

Browse files
committed
eslint: Fix no-explicit-any errors
1 parent f95351f commit eba94c5

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

examples/jest_integration/integration.fuzz.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
/* eslint no-constant-condition: 0 */
18-
1917
const target = require("./target.js");
2018

2119
describe("My describe", () => {
@@ -55,7 +53,7 @@ describe("My describe", () => {
5553
// finding and shut down the whole process with exit code 70.
5654
it.skip.fuzz("Sync timeout", () => {
5755
// noinspection InfiniteLoopJS
58-
while (true) {
56+
for (;;) {
5957
// Ignore
6058
}
6159
});

packages/hooking/hook.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17+
/* eslint @typescript-eslint/no-explicit-any: 0 */
18+
1719
export interface TrackedHook {
1820
target: string;
1921
pkg: string;
@@ -143,7 +145,6 @@ export function logHooks(hooks: Hook[]) {
143145

144146
export const hookTracker = new HookTracker();
145147

146-
/*eslint @typescript-eslint/no-explicit-any: 0 */
147148
export enum HookType {
148149
Before,
149150
After,

packages/hooking/manager.test.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1+
/*
2+
* Copyright 2023 Code Intelligence GmbH
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
import { hookManager } from "./manager";
218
import { HookType } from "./hook";
319

4-
/* eslint @typescript-eslint/ban-types: 0 */
5-
620
describe("Hooks manager", () => {
721
describe("Matching hooks", () => {
822
it("should be valid when having a single REPLACE hook", () => {

packages/instrumentor/plugins/functionHooks.test.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,7 @@ describe("function hooks instrumentation", () => {
562562
expectTrackedHooksUnknown(hookCallMap, 0);
563563
});
564564

565-
//eslint-disable-next-line @typescript-eslint/no-explicit-any
566-
it("one hook called after an async function", (): any => {
565+
it("one hook called after an async function", () => {
567566
hooking.hookManager.clearHooks();
568567
hookTracker.clear();
569568
const hookCallMap = registerAsyncFunctionHook(
@@ -619,8 +618,7 @@ describe("function hooks instrumentation", () => {
619618
expectLogHooks(dbgMock, 1, "After", "foo");
620619
});
621620

622-
//eslint-disable-next-line @typescript-eslint/no-explicit-any
623-
it("two hooks called after an async function", (): any => {
621+
it("two hooks called after an async function", () => {
624622
hooking.hookManager.clearHooks();
625623
hookTracker.clear();
626624
const hookCallMap = registerAsyncFunctionHook(
@@ -832,8 +830,7 @@ describe("function hooks instrumentation", () => {
832830
expectTrackedHooksUnknown(beforeHookCallMap, 0);
833831
expectTrackedHooksUnknown(afterHookCallMap, 0);
834832
});
835-
//eslint-disable-next-line @typescript-eslint/no-explicit-any
836-
it("one Before and ond After hook for an async function", (): any => {
833+
it("one Before and ond After hook for an async function", () => {
837834
hooking.hookManager.clearHooks();
838835
hookTracker.clear();
839836
const beforeHookCallMap = registerSyncFunctionHook(

0 commit comments

Comments
 (0)