UNPKG

@o3r/eslint-plugin

Version:

The module provides in-house eslint plugins to use in your own eslint configuration.

23 lines (22 loc) 1.15 kB
import { ESLintUtils, TSESLint, TSESTree } from '@typescript-eslint/utils'; /** ESLint rule generator */ export declare const createRule: <Options extends readonly unknown[], MessageIds extends string>({ meta, name, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds, unknown>>) => ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>; /** Default supported interface names */ export declare const defaultSupportedInterfaceNames: string[]; /** * Returns true if the node extends one of the `supportedInterfaceNames` * @param interfaceDeclNode * @param supportedInterfaceNames */ export declare const isExtendingConfiguration: (interfaceDeclNode: TSESTree.Node | undefined, supportedInterfaceNames?: string[]) => interfaceDeclNode is TSESTree.Node; /** * Returns the comment above the node * @param node * @param sourceCode */ export declare const getNodeComment: (node: TSESTree.Node, sourceCode: TSESLint.SourceCode) => TSESTree.Comment | undefined; /** * Wraps `commentValue` into a comment * @param commentValue */ export declare const createCommentString: (commentValue: string) => string;