diff --git a/docs/developers/Custom_Rules.mdx b/docs/developers/Custom_Rules.mdx index d0494bdd0c33..2347d4db88a9 100644 --- a/docs/developers/Custom_Rules.mdx +++ b/docs/developers/Custom_Rules.mdx @@ -233,15 +233,13 @@ In that case, it is best to add an explicit type declaration. This rule snippet targets name nodes of both function and interface declarations: ```ts -import { AST_NODE_TYPES, ESLintUtils } from '@typescript-eslint/utils'; +import { TSESTree } from '@typescript-eslint/utils'; export const rule = createRule({ create(context) { return { 'FunctionDeclaration, TSInterfaceDeclaration'( - node: - | AST_NODE_TYPES.FunctionDeclaration - | AST_NODE_TYPES.TSInterfaceDeclaration, + node: TSESTree.FunctionDeclaration | TSESTree.TSInterfaceDeclaration, ) { if (/^[a-z]/.test(node.id.name)) { // ...