Reduce any typings in our eslint rules

This commit is contained in:
Matt Bierner
2025-11-10 13:49:24 -08:00
parent 734a949cad
commit 1d2bb43237
32 changed files with 123 additions and 83 deletions

View File

@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as eslint from 'eslint';
import * as ESTree from 'estree';
import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/utils';
export = new class ApiLiteralOrTypes implements eslint.Rule.RuleModule {
@@ -17,7 +18,7 @@ export = new class ApiLiteralOrTypes implements eslint.Rule.RuleModule {
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
return {
['TSDeclareFunction Identifier[name=/create.*/]']: (node: any) => {
['TSDeclareFunction Identifier[name=/create.*/]']: (node: ESTree.Node) => {
const decl = <TSESTree.FunctionDeclaration>(<TSESTree.Identifier>node).parent;