diff --git a/src/index.js b/src/index.js index 07c7a245..c9e904f2 100644 --- a/src/index.js +++ b/src/index.js @@ -19,7 +19,28 @@ import rules from "./build/rules.js"; /** @typedef {import("eslint").Linter.RulesRecord} RulesRecord*/ /** @typedef {import("eslint").Linter.Config} Config*/ -/** @typedef {import("eslint").ESLint.Plugin} Plugin */ +/** @typedef {import("eslint").Linter.LegacyConfig} LegacyConfig*/ +/** @typedef {import("eslint").Linter.Processor} Processor*/ +/** + * @typedef {import("eslint").ESLint.Plugin & + * { meta: { + * name: string; + * version: string; + * }} & + * { processors: { + * markdown: Processor; + * }} & + * { languages: { + * commonmark: Language; + * gfm: Language; + * }} & + * { configs: { + * "recommended-legacy": LegacyConfig; + * recommended: Config[]; + * processor: Config[]; + * }} + * } Plugin + */ /** * @typedef {import("./types.ts").MarkdownRuleDefinition} MarkdownRuleDefinition * @template {Partial} [Options={}] @@ -57,6 +78,7 @@ const processorRulesConfig = { let recommendedPlugins, processorPlugins; +/** @type {Plugin} */ const plugin = { meta: { name: "@eslint/markdown", diff --git a/tests/types/tsconfig.json b/tests/types/tsconfig.json index 8bc51769..03c94a5a 100644 --- a/tests/types/tsconfig.json +++ b/tests/types/tsconfig.json @@ -4,7 +4,8 @@ "emitDeclarationOnly": false, "noEmit": true, "rootDir": "../..", - "strict": true + "strict": true, + "exactOptionalPropertyTypes": true }, "files": [], "include": [".", "../../dist"]