UNPKG

@nitra/eslint-config

Version:

An ESLint shareable config for projects using Vue and Node

45 lines (43 loc) 1.77 kB
/* oxlint-disable import/first */ /** * Шлях для graphql-config: для віртуальних блоків Vue — фізичний .vue, інакше той самий filePath. * @param {string} filePath шлях файлу, який обробляє processor * @returns {string} шлях для loadOnDiskGraphQLConfig та getProjectForFile */ export function graphQLConfigPathAnchor(filePath?: string): string /** * Парсер graphql-eslint: той самий anchor для filePath, щоб loadGraphQLConfig знаходив проєкт для віртуальних document.graphql з-під Vue. * @param {string} code вміст GraphQL-документа * @param {import('eslint').Linter.ParserOptions} options опції ESLint (filePath тощо) * @returns {ReturnType<typeof baseParser.parseForESLint>} AST і parserServices для graphql-eslint */ export function graphqlParseForESLintWithAnchor( code: string, options?: import('eslint').Linter.ParserOptions ): ReturnType<typeof baseParser.parseForESLint> export namespace graphqlCodefileProcessor { namespace meta { export let name: string export { version } } let supportsAutofix: boolean function preprocess(code: any, filePath: any): any[] function postprocess(messages: any, filePath: any): any } export namespace graphqlParserWithConfigAnchor { let meta_1: { name: string version: string | undefined } export { meta_1 as meta } export { graphqlParseForESLintWithAnchor as parseForESLint } } declare const baseParser: { parseForESLint: typeof import('@graphql-eslint/eslint-plugin').parseForESLint meta: { name: string version: string | undefined } } import { version } from '@graphql-eslint/eslint-plugin/meta' export {}