@o3r/eslint-plugin
Version:
The module provides in-house eslint plugins to use in your own eslint configuration.
23 lines (22 loc) • 1.04 kB
TypeScript
import { type ParserServices, TSESLint } from '@typescript-eslint/utils';
/** Basic interface for the Parser Services object provided by yaml-eslint-parser */
type YamlParserServices = ParserServices & {
isYAML: boolean;
};
/**
* Determine if yaml-eslint-parser is used
* @param parserServices Parser services object
*/
export declare function isYamlParserServices(parserServices: any): parserServices is YamlParserServices;
/**
* Retrieve the yaml parser services object or throw if the invalid parser is used
* @param context Rule context
*/
export declare function getYamlParserServices(context: Readonly<TSESLint.RuleContext<string, readonly unknown[]>>): YamlParserServices;
/**
* Utility for rule authors to ensure that their rule is correctly being used with yaml-eslint-parser
* If yaml-eslint-parser is not the configured parser when the function is invoked it will throw
* @param context
*/
export declare function ensureJsoncParser(context: Readonly<TSESLint.RuleContext<string, readonly unknown[]>>): void;
export {};