UNPKG

eslint-plugin-arrow-return-style-x

Version:
78 lines (77 loc) 3.07 kB
import { TSESLint } from "@typescript-eslint/utils"; import "@typescript-eslint/utils/eslint-utils"; import { Options as Options$1 } from "prettier"; import * as _typescript_eslint_utils_ts_eslint0 from "@typescript-eslint/utils/ts-eslint"; import { Linter } from "eslint"; //#region src/util.d.ts interface PluginDocumentation { description: string; recommended?: boolean; requiresTypeChecking: boolean; } //#endregion //#region src/rules/arrow-return-style/rule.d.ts declare const ObjectReturnStyle: { readonly AlwaysExplicit: "always-explicit"; readonly ComplexExplicit: "complex-explicit"; readonly Off: "off"; }; type ArrowReturnStyleOptions = [{ jsxAlwaysUseExplicitReturn?: boolean; maxLen?: number; maxObjectProperties?: number; namedExportsAlwaysUseExplicitReturn?: boolean; objectReturnStyle?: ObjectReturnStyle; usePrettier?: boolean | null | Options$1; }]; type ObjectReturnStyle = (typeof ObjectReturnStyle)[keyof typeof ObjectReturnStyle]; //#endregion //#region src/plugin.d.ts declare const plugin: { meta: { name: string; version: string; }; rules: { "arrow-return-style": TSESLint.RuleModule<"use-explicit-return-complex" | "use-explicit-return" | "use-implicit-return", ArrowReturnStyleOptions, PluginDocumentation, TSESLint.RuleListener>; "no-export-default-arrow": TSESLint.RuleModule<string, [], PluginDocumentation, TSESLint.RuleListener>; }; }; //#endregion //#region src/index.d.ts declare const _default: { configs: { recommended: { plugins: { [x: string]: { meta: { name: string; version: string; }; rules: { "arrow-return-style": _typescript_eslint_utils_ts_eslint0.RuleModule<"use-explicit-return-complex" | "use-explicit-return" | "use-implicit-return", ArrowReturnStyleOptions, PluginDocumentation, _typescript_eslint_utils_ts_eslint0.RuleListener>; "no-export-default-arrow": _typescript_eslint_utils_ts_eslint0.RuleModule<string, [], PluginDocumentation, _typescript_eslint_utils_ts_eslint0.RuleListener>; }; }; }; rules: { "arrow-body-style": "off"; "arrow-return-style/arrow-return-style": "error"; "arrow-return-style/no-export-default-arrow": "error"; }; }; }; meta: { name: string; version: string; }; rules: { "arrow-return-style": _typescript_eslint_utils_ts_eslint0.RuleModule<"use-explicit-return-complex" | "use-explicit-return" | "use-implicit-return", ArrowReturnStyleOptions, PluginDocumentation, _typescript_eslint_utils_ts_eslint0.RuleListener>; "no-export-default-arrow": _typescript_eslint_utils_ts_eslint0.RuleModule<string, [], PluginDocumentation, _typescript_eslint_utils_ts_eslint0.RuleListener>; }; }; type RuleOptions = { [K in keyof RuleDefinitions]: RuleDefinitions[K]["defaultOptions"] }; type Rules = { [K in keyof RuleOptions]: Linter.RuleEntry<RuleOptions[K]> }; type RuleDefinitions = typeof plugin.rules; //#endregion export { RuleOptions, Rules, _default as default };