Skip to content

Commit 9e2b16a

Browse files
Merge pull request #3353 from github/robertbrignull/eslint_no_any
Enable no-explicit-any throughout production code
2 parents f4eed4d + 93e6c53 commit 9e2b16a

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

extensions/ql-vscode/.eslintrc.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const baseConfig = {
4040
ignoreRestSiblings: false,
4141
},
4242
],
43-
"@typescript-eslint/no-explicit-any": "off",
43+
"@typescript-eslint/no-explicit-any": "error",
4444
"@typescript-eslint/no-floating-promises": ["error", { ignoreVoid: true }],
4545
"@typescript-eslint/no-invalid-this": "off",
4646
"@typescript-eslint/no-shadow": "off",
@@ -188,5 +188,11 @@ module.exports = {
188188
"import/no-namespace": ["error", { ignore: ["react"] }],
189189
},
190190
},
191+
{
192+
files: ["test/**/*", "gulpfile.ts/**/*"],
193+
rules: {
194+
"@typescript-eslint/no-explicit-any": "off",
195+
},
196+
},
191197
],
192198
};

extensions/ql-vscode/src/packages/commands/CommandManager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import type { Disposable } from "./Disposable";
1010
/**
1111
* A command function is a completely untyped command.
1212
*/
13+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1314
export type CommandFunction = (...args: any[]) => Promise<unknown>;
1415

1516
/**

extensions/ql-vscode/src/view/common/SuggestBox/useEffectEvent.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { useCallback, useInsertionEffect, useRef } from "react";
99
*
1010
* @param callback The callback to call when the event is triggered.
1111
*/
12+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1213
export function useEffectEvent<T extends (...args: any[]) => any>(callback: T) {
1314
const ref = useRef<T>(callback);
1415

extensions/ql-vscode/src/view/results/ResultsApp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export function ResultsApp() {
173173
},
174174
selectedTable: tableName,
175175
},
176-
origResultsPaths: undefined as any, // FIXME: Not used for interpreted, refactor so this is not needed
176+
origResultsPaths: undefined as unknown as ResultsPaths, // FIXME: Not used for interpreted, refactor so this is not needed
177177
sortedResultsMap: new Map(), // FIXME: Not used for interpreted, refactor so this is not needed
178178
database: msg.database,
179179
interpretation: msg.interpretation,

0 commit comments

Comments
 (0)