Merge pull request #3353 from github/robertbrignull/eslint_no_any
Enable no-explicit-any throughout production code
This commit is contained in:
Коммит
9e2b16afe3
|
@ -40,7 +40,7 @@ const baseConfig = {
|
|||
ignoreRestSiblings: false,
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
"@typescript-eslint/no-floating-promises": ["error", { ignoreVoid: true }],
|
||||
"@typescript-eslint/no-invalid-this": "off",
|
||||
"@typescript-eslint/no-shadow": "off",
|
||||
|
@ -188,5 +188,11 @@ module.exports = {
|
|||
"import/no-namespace": ["error", { ignore: ["react"] }],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["test/**/*", "gulpfile.ts/**/*"],
|
||||
rules: {
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
@ -10,6 +10,7 @@ import type { Disposable } from "./Disposable";
|
|||
/**
|
||||
* A command function is a completely untyped command.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export type CommandFunction = (...args: any[]) => Promise<unknown>;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,7 @@ import { useCallback, useInsertionEffect, useRef } from "react";
|
|||
*
|
||||
* @param callback The callback to call when the event is triggered.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export function useEffectEvent<T extends (...args: any[]) => any>(callback: T) {
|
||||
const ref = useRef<T>(callback);
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ export function ResultsApp() {
|
|||
},
|
||||
selectedTable: tableName,
|
||||
},
|
||||
origResultsPaths: undefined as any, // FIXME: Not used for interpreted, refactor so this is not needed
|
||||
origResultsPaths: undefined as unknown as ResultsPaths, // FIXME: Not used for interpreted, refactor so this is not needed
|
||||
sortedResultsMap: new Map(), // FIXME: Not used for interpreted, refactor so this is not needed
|
||||
database: msg.database,
|
||||
interpretation: msg.interpretation,
|
||||
|
|
Загрузка…
Ссылка в новой задаче