eslint-plugin-jsdoc 57.0.7 → 57.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,9 +8,9 @@ export type ErrorLevelVariants = "" | "-error";
8
8
  * @typedef {"" | "-error"} ErrorLevelVariants
9
9
  * @type {import('eslint').ESLint.Plugin & {
10
10
  * configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,
11
- * import('eslint').Linter.Config>|Record<"examples"|"default-expressions"|"examples-and-default-expressions", import('eslint').Linter.Config[]>
11
+ * import('eslint').Linter.Config> & Record<"examples"|"default-expressions"|"examples-and-default-expressions", import('eslint').Linter.Config[]>
12
12
  * }}
13
13
  */
14
14
  declare const index: import("eslint").ESLint.Plugin & {
15
- configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`, import("eslint").Linter.Config> | Record<"examples" | "default-expressions" | "examples-and-default-expressions", import("eslint").Linter.Config[]>;
15
+ configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`, import("eslint").Linter.Config> & Record<"examples" | "default-expressions" | "examples-and-default-expressions", import("eslint").Linter.Config[]>;
16
16
  };
@@ -27,7 +27,6 @@ const recommended = options.includes('--recommended');
27
27
  return;
28
28
  }
29
29
  const ruleNamesPath = './test/rules/ruleNames.json';
30
- // @ts-expect-error Older types?
31
30
  const ruleNames = JSON.parse(await _promises.default.readFile(ruleNamesPath));
32
31
  if (!ruleNames.includes(ruleName)) {
33
32
  ruleNames.push(ruleName);
@@ -1 +1 @@
1
- {"version":3,"file":"generateRule.cjs","names":["_camelcase","_interopRequireDefault","require","_fs","_promises","_openEditor","_path","e","__esModule","default","_interopRequireWildcard","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ruleName","options","process","argv","recommended","includes","console","error","test","ruleNamesPath","ruleNames","JSON","parse","fs","readFile","push","sort","writeFile","stringify","log","ruleTemplate","camelCasedRuleName","camelCase","rulePath","existsSync","ruleTestTemplate","ruleTestPath","ruleReadmeTemplate","ruleReadmePath","replaceInOrder","checkName","newLine","oldIsCamel","oldRegex","path","offsets","readme","replace","matchedLine","n1","offset","str","oldRule","oldRuleB","alreadyIncluded","itemIndex","findIndex","item","undefined","pop","length","slice","repeat","Promise","resolve","then","chdir","__dirname","open"],"sources":["../src/bin/generateRule.js"],"sourcesContent":["/* eslint-disable no-console -- CLI */\n\nimport camelCase from 'camelcase';\nimport {\n existsSync,\n} from 'fs';\nimport fs from 'fs/promises';\n/**\n * @example\n * ```shell\n * pnpm run create-rule my-new-rule -- --recommended\n * ```\n */\nimport open from 'open-editor';\nimport {\n resolve,\n} from 'path';\n\n// Todo: Would ideally have prompts, e.g., to ask for whether\n// type was problem/layout, etc.\n\nconst [\n , , ruleName,\n ...options\n] = process.argv;\n\nconst recommended = options.includes('--recommended');\n\n(async () => {\n if (!ruleName) {\n console.error('Please supply a rule name');\n\n return;\n }\n\n if ((/[A-Z]/v).test(ruleName)) {\n console.error('Please ensure the rule has no capital letters');\n\n return;\n }\n\n const ruleNamesPath = './test/rules/ruleNames.json';\n // @ts-expect-error Older types?\n const ruleNames = JSON.parse(await fs.readFile(\n ruleNamesPath,\n ));\n if (!ruleNames.includes(ruleName)) {\n ruleNames.push(ruleName);\n ruleNames.sort();\n }\n\n await fs.writeFile(ruleNamesPath, JSON.stringify(ruleNames, null, 2) + '\\n');\n console.log('ruleNames', ruleNames);\n\n const ruleTemplate = `import iterateJsdoc from '../iterateJsdoc.js';\n\nexport default iterateJsdoc(({\n context,\n utils,\n}) => {\n // Rule here\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: '',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/${ruleName}.md#repos-sticky-header',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n // Option properties here (or remove the object)\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n`;\n\n const camelCasedRuleName = camelCase(ruleName);\n\n const rulePath = `./src/rules/${camelCasedRuleName}.js`;\n\n if (!existsSync(rulePath)) {\n await fs.writeFile(rulePath, ruleTemplate);\n }\n\n const ruleTestTemplate = `export default {\n invalid: [\n {\n code: \\`\n \\`,\n errors: [\n {\n line: 2,\n message: '',\n },\n ],\n },\n ],\n valid: [\n {\n code: \\`\n \\`,\n },\n ],\n};\n`;\n\n const ruleTestPath = `./test/rules/assertions/${camelCasedRuleName}.js`;\n if (!existsSync(ruleTestPath)) {\n await fs.writeFile(ruleTestPath, ruleTestTemplate);\n }\n\n const ruleReadmeTemplate = `# \\`${ruleName}\\`\n\n|||\n|---|---|\n|Context|everywhere|\n|Tags|\\`\\`|\n|Recommended|${recommended ? 'true' : 'false'}|\n|Settings||\n|Options||\n\n## Failing examples\n\n<!-- assertions-failing ${camelCasedRuleName} -->\n\n## Passing examples\n\n<!-- assertions-passing ${camelCasedRuleName} -->\n`;\n\n const ruleReadmePath = `./.README/rules/${ruleName}.md`;\n if (!existsSync(ruleReadmePath)) {\n await fs.writeFile(ruleReadmePath, ruleReadmeTemplate);\n }\n\n /**\n * @param {object} cfg\n * @param {string} cfg.path\n * @param {RegExp} cfg.oldRegex\n * @param {string} cfg.checkName\n * @param {string} cfg.newLine\n * @param {boolean} [cfg.oldIsCamel]\n * @returns {Promise<void>}\n */\n const replaceInOrder = async ({\n checkName,\n newLine,\n oldIsCamel,\n oldRegex,\n path,\n }) => {\n /**\n * @typedef {number} Integer\n */\n /**\n * @typedef {{\n * matchedLine: string,\n * offset: Integer,\n * oldRule: string,\n * }} OffsetInfo\n */\n /**\n * @type {OffsetInfo[]}\n */\n const offsets = [];\n\n let readme = await fs.readFile(path, 'utf8');\n readme.replace(\n oldRegex,\n /**\n * @param {string} matchedLine\n * @param {string} n1\n * @param {Integer} offset\n * @param {string} str\n * @param {object} groups\n * @param {string} groups.oldRule\n * @returns {string}\n */\n (matchedLine, n1, offset, str, {\n oldRule,\n }) => {\n offsets.push({\n matchedLine,\n offset,\n oldRule,\n });\n\n return matchedLine;\n },\n );\n\n offsets.sort(({\n oldRule,\n }, {\n oldRule: oldRuleB,\n }) => {\n return oldRule < oldRuleB ? -1 : (oldRule > oldRuleB ? 1 : 0);\n });\n\n let alreadyIncluded = false;\n const itemIndex = offsets.findIndex(({\n oldRule,\n }) => {\n alreadyIncluded ||= oldIsCamel ? camelCasedRuleName === oldRule : ruleName === oldRule;\n\n return oldIsCamel ? camelCasedRuleName < oldRule : ruleName < oldRule;\n });\n let item = itemIndex !== undefined && offsets[itemIndex];\n if (item && itemIndex === 0 &&\n\n // This property would not always be sufficient but in this case it is.\n oldIsCamel\n ) {\n item.offset = 0;\n }\n\n if (!item) {\n item = /** @type {OffsetInfo} */ (offsets.pop());\n item.offset += item.matchedLine.length;\n }\n\n if (alreadyIncluded) {\n console.log(`Rule name is already present in ${checkName}.`);\n } else {\n readme = readme.slice(0, item.offset) +\n (item.offset ? '\\n' : '') +\n newLine +\n (item.offset ? '' : '\\n') +\n readme.slice(item.offset);\n\n await fs.writeFile(path, readme);\n }\n };\n\n // await replaceInOrder({\n // checkName: 'README',\n // newLine: `{\"gitdown\": \"include\", \"file\": \"./rules/${ruleName}.md\"}`,\n // oldRegex: /\\n\\{\"gitdown\": \"include\", \"file\": \".\\/rules\\/(?<oldRule>[^.]*).md\"\\}/gv,\n // path: './.README/README.md',\n // });\n\n await replaceInOrder({\n checkName: 'index import',\n newLine: `import ${camelCasedRuleName} from './rules/${camelCasedRuleName}.js';`,\n oldIsCamel: true,\n oldRegex: /\\nimport (?<oldRule>[^ ]*) from '.\\/rules\\/\\1\\.js';/gv,\n path: './src/index-cjs.js',\n });\n\n await replaceInOrder({\n checkName: 'index recommended',\n newLine: `${' '.repeat(6)}'jsdoc/${ruleName}': ${recommended ? 'warnOrError' : '\\'off\\''},`,\n oldRegex: /\\n\\s{6}'jsdoc\\/(?<oldRule>[^']*)': .*?,/gv,\n path: './src/index-cjs.js',\n });\n\n await replaceInOrder({\n checkName: 'index rules',\n newLine: `${' '.repeat(2)}'${ruleName}': ${camelCasedRuleName},`,\n oldRegex: /\\n\\s{2}'(?<oldRule>[^']*)': [^,]*,/gv,\n path: './src/index-cjs.js',\n });\n\n await import('./generateDocs.js');\n\n /*\n console.log('Paths to open for further editing\\n');\n console.log(`open ${ruleReadmePath}`);\n console.log(`open ${rulePath}`);\n console.log(`open ${ruleTestPath}\\n`);\n */\n\n // Set chdir as somehow still in operation from other test\n process.chdir(resolve(import.meta.dirname, '../../'));\n await open([\n // Could even add editor line column numbers like `${rulePath}:1:1`\n ruleReadmePath,\n ruleTestPath,\n rulePath,\n ]);\n})();\n"],"mappings":";;AAEA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,GAAA,GAAAD,OAAA;AAGA,IAAAE,SAAA,GAAAH,sBAAA,CAAAC,OAAA;AAOA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAEc,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,wBAAAH,CAAA,EAAAI,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,uBAAA,YAAAA,CAAAH,CAAA,EAAAI,CAAA,SAAAA,CAAA,IAAAJ,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAQ,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAT,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAU,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAZ,CAAA,UAAAQ,CAAA,CAAAK,GAAA,CAA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IACnBC,SAAS,EAAE,aAAa;IACxBC,OAAO,EAAE,GAAG,GAAG,CAACqB,MAAM,CAAC,CAAC,CAAC,IAAIpD,QAAQ,MAAMqB,kBAAkB,GAAG;IAChEY,QAAQ,EAAE,sCAAsC;IAChDC,IAAI,EAAE;EACR,CAAC,CAAC;EAEF,MAAAmB,OAAA,CAAAC,OAAA,GAAAC,IAAA,OAAAxE,uBAAA,CAAAR,OAAA,CAAa,mBAAmB,GAAC;;EAEjC;AACF;AACA;AACA;AACA;AACA;;EAEE;EACA2B,OAAO,CAACsD,KAAK,CAAC,IAAAF,aAAO,EAAAG,SAAA,EAAsB,QAAQ,CAAC,CAAC;EACrD,MAAM,IAAAC,mBAAI,EAAC;EACT;EACA9B,cAAc,EACdF,YAAY,EACZH,QAAQ,CACT,CAAC;AACJ,CAAC,EAAE,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"generateRule.cjs","names":["_camelcase","_interopRequireDefault","require","_fs","_promises","_openEditor","_path","e","__esModule","default","_interopRequireWildcard","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ruleName","options","process","argv","recommended","includes","console","error","test","ruleNamesPath","ruleNames","JSON","parse","fs","readFile","push","sort","writeFile","stringify","log","ruleTemplate","camelCasedRuleName","camelCase","rulePath","existsSync","ruleTestTemplate","ruleTestPath","ruleReadmeTemplate","ruleReadmePath","replaceInOrder","checkName","newLine","oldIsCamel","oldRegex","path","offsets","readme","replace","matchedLine","n1","offset","str","oldRule","oldRuleB","alreadyIncluded","itemIndex","findIndex","item","undefined","pop","length","slice","repeat","Promise","resolve","then","chdir","__dirname","open"],"sources":["../src/bin/generateRule.js"],"sourcesContent":["/* eslint-disable no-console -- CLI */\n\nimport camelCase from 'camelcase';\nimport {\n existsSync,\n} from 'fs';\nimport fs from 'fs/promises';\n/**\n * @example\n * ```shell\n * pnpm run create-rule my-new-rule -- --recommended\n * ```\n */\nimport open from 'open-editor';\nimport {\n resolve,\n} from 'path';\n\n// Todo: Would ideally have prompts, e.g., to ask for whether\n// type was problem/layout, etc.\n\nconst [\n , , ruleName,\n ...options\n] = process.argv;\n\nconst recommended = options.includes('--recommended');\n\n(async () => {\n if (!ruleName) {\n console.error('Please supply a rule name');\n\n return;\n }\n\n if ((/[A-Z]/v).test(ruleName)) {\n console.error('Please ensure the rule has no capital letters');\n\n return;\n }\n\n const ruleNamesPath = './test/rules/ruleNames.json';\n const ruleNames = JSON.parse(await fs.readFile(\n ruleNamesPath,\n ));\n if (!ruleNames.includes(ruleName)) {\n ruleNames.push(ruleName);\n ruleNames.sort();\n }\n\n await fs.writeFile(ruleNamesPath, JSON.stringify(ruleNames, null, 2) + '\\n');\n console.log('ruleNames', ruleNames);\n\n const ruleTemplate = `import iterateJsdoc from '../iterateJsdoc.js';\n\nexport default iterateJsdoc(({\n context,\n utils,\n}) => {\n // Rule here\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: '',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/${ruleName}.md#repos-sticky-header',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n // Option properties here (or remove the object)\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n`;\n\n const camelCasedRuleName = camelCase(ruleName);\n\n const rulePath = `./src/rules/${camelCasedRuleName}.js`;\n\n if (!existsSync(rulePath)) {\n await fs.writeFile(rulePath, ruleTemplate);\n }\n\n const ruleTestTemplate = `export default {\n invalid: [\n {\n code: \\`\n \\`,\n errors: [\n {\n line: 2,\n message: '',\n },\n ],\n },\n ],\n valid: [\n {\n code: \\`\n \\`,\n },\n ],\n};\n`;\n\n const ruleTestPath = `./test/rules/assertions/${camelCasedRuleName}.js`;\n if (!existsSync(ruleTestPath)) {\n await fs.writeFile(ruleTestPath, ruleTestTemplate);\n }\n\n const ruleReadmeTemplate = `# \\`${ruleName}\\`\n\n|||\n|---|---|\n|Context|everywhere|\n|Tags|\\`\\`|\n|Recommended|${recommended ? 'true' : 'false'}|\n|Settings||\n|Options||\n\n## Failing examples\n\n<!-- assertions-failing ${camelCasedRuleName} -->\n\n## Passing examples\n\n<!-- assertions-passing ${camelCasedRuleName} -->\n`;\n\n const ruleReadmePath = `./.README/rules/${ruleName}.md`;\n if (!existsSync(ruleReadmePath)) {\n await fs.writeFile(ruleReadmePath, ruleReadmeTemplate);\n }\n\n /**\n * @param {object} cfg\n * @param {string} cfg.path\n * @param {RegExp} cfg.oldRegex\n * @param {string} cfg.checkName\n * @param {string} cfg.newLine\n * @param {boolean} [cfg.oldIsCamel]\n * @returns {Promise<void>}\n */\n const replaceInOrder = async ({\n checkName,\n newLine,\n oldIsCamel,\n oldRegex,\n path,\n }) => {\n /**\n * @typedef {number} Integer\n */\n /**\n * @typedef {{\n * matchedLine: string,\n * offset: Integer,\n * oldRule: string,\n * }} OffsetInfo\n */\n /**\n * @type {OffsetInfo[]}\n */\n const offsets = [];\n\n let readme = await fs.readFile(path, 'utf8');\n readme.replace(\n oldRegex,\n /**\n * @param {string} matchedLine\n * @param {string} n1\n * @param {Integer} offset\n * @param {string} str\n * @param {object} groups\n * @param {string} groups.oldRule\n * @returns {string}\n */\n (matchedLine, n1, offset, str, {\n oldRule,\n }) => {\n offsets.push({\n matchedLine,\n offset,\n oldRule,\n });\n\n return matchedLine;\n },\n );\n\n offsets.sort(({\n oldRule,\n }, {\n oldRule: oldRuleB,\n }) => {\n return oldRule < oldRuleB ? -1 : (oldRule > oldRuleB ? 1 : 0);\n });\n\n let alreadyIncluded = false;\n const itemIndex = offsets.findIndex(({\n oldRule,\n }) => {\n alreadyIncluded ||= oldIsCamel ? camelCasedRuleName === oldRule : ruleName === oldRule;\n\n return oldIsCamel ? camelCasedRuleName < oldRule : ruleName < oldRule;\n });\n let item = itemIndex !== undefined && offsets[itemIndex];\n if (item && itemIndex === 0 &&\n\n // This property would not always be sufficient but in this case it is.\n oldIsCamel\n ) {\n item.offset = 0;\n }\n\n if (!item) {\n item = /** @type {OffsetInfo} */ (offsets.pop());\n item.offset += item.matchedLine.length;\n }\n\n if (alreadyIncluded) {\n console.log(`Rule name is already present in ${checkName}.`);\n } else {\n readme = readme.slice(0, item.offset) +\n (item.offset ? '\\n' : '') +\n newLine +\n (item.offset ? '' : '\\n') +\n readme.slice(item.offset);\n\n await fs.writeFile(path, readme);\n }\n };\n\n // await replaceInOrder({\n // checkName: 'README',\n // newLine: `{\"gitdown\": \"include\", \"file\": \"./rules/${ruleName}.md\"}`,\n // oldRegex: /\\n\\{\"gitdown\": \"include\", \"file\": \".\\/rules\\/(?<oldRule>[^.]*).md\"\\}/gv,\n // path: './.README/README.md',\n // });\n\n await replaceInOrder({\n checkName: 'index import',\n newLine: `import ${camelCasedRuleName} from './rules/${camelCasedRuleName}.js';`,\n oldIsCamel: true,\n oldRegex: /\\nimport (?<oldRule>[^ ]*) from '.\\/rules\\/\\1\\.js';/gv,\n path: './src/index-cjs.js',\n });\n\n await replaceInOrder({\n checkName: 'index recommended',\n newLine: `${' '.repeat(6)}'jsdoc/${ruleName}': ${recommended ? 'warnOrError' : '\\'off\\''},`,\n oldRegex: /\\n\\s{6}'jsdoc\\/(?<oldRule>[^']*)': .*?,/gv,\n path: './src/index-cjs.js',\n });\n\n await replaceInOrder({\n checkName: 'index rules',\n newLine: `${' '.repeat(2)}'${ruleName}': ${camelCasedRuleName},`,\n oldRegex: /\\n\\s{2}'(?<oldRule>[^']*)': [^,]*,/gv,\n path: './src/index-cjs.js',\n });\n\n await import('./generateDocs.js');\n\n /*\n console.log('Paths to open for further editing\\n');\n console.log(`open ${ruleReadmePath}`);\n console.log(`open ${rulePath}`);\n console.log(`open ${ruleTestPath}\\n`);\n */\n\n // Set chdir as somehow still in operation from other test\n process.chdir(resolve(import.meta.dirname, '../../'));\n await open([\n // Could even add editor line column numbers like `${rulePath}:1:1`\n ruleReadmePath,\n ruleTestPath,\n rulePath,\n ]);\n})();\n"],"mappings":";;AAEA,IAAAA,UAAA,GAAAC,sBA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F,YAAY,EACZH,QAAQ,CACT,CAAC;AACJ,CAAC,EAAE,CAAC","ignoreList":[]}
@@ -23,9 +23,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
23
23
 
24
24
  const {
25
25
  version
26
- } = JSON.parse(
27
- // @ts-expect-error `Buffer` is ok for `JSON.parse`
28
- (0, _nodeFs.readFileSync)((0, _nodePath.join)(__dirname, '../package.json')));
26
+ } = JSON.parse((0, _nodeFs.readFileSync)((0, _nodePath.join)(__dirname, '../package.json'), 'utf8'));
29
27
 
30
28
  // const zeroBasedLineIndexAdjust = -1;
31
29
  const likelyNestedJSDocIndentSpace = 1;
@@ -1 +1 @@
1
- {"version":3,"file":"getJsdocProcessorPlugin.cjs","names":["_jsdocUtils","require","_jsdoccomment","espree","_interopRequireWildcard","_nodeFs","_nodePath","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","version","JSON","parse","readFileSync","join","__dirname","likelyNestedJSDocIndentSpace","preTagSpaceLength","firstLinePrefixLength","hasCaptionRegex","escapeStringRegexp","str","replaceAll","countChars","ch","match","RegExp","length","getLinesCols","text","matchLines","colDelta","slice","lastIndexOf","getJsdocProcessorPlugin","options","allowedLanguagesToProcess","captionRequired","checkDefaults","checkExamples","checkParams","checkProperties","exampleCodeRegex","matchingFileName","matchingFileNameDefaults","matchingFileNameParams","matchingFileNameProperties","paddedIndent","parser","undefined","rejectExampleCodeRegex","sourceType","exampleCodeRegExp","rejectExampleCodeRegExp","getRegexFromString","otherInfo","extraMessages","getTextsAndFileNames","jsdoc","jsFileName","commentLineCols","textsAndFileNames","checkSource","cols","defaultFileName","ext","filename","lines","skipInit","source","sources","tag","line","targetTagName","push","nonJSPrefacingCols","nonJSPrefacingLines","string","addSourceInfo","src","file","number","codeStartLine","codeStartCol","targetSource","getFilenameInfo","includes","replace","filenameInfo","forEachPreferredTag","description","trim","getTagDescription","tagName","getPreferredTagName","hasTag","matchingFilenameInfo","column","message","ruleId","severity","test","matches","exec","groups","language","toLowerCase","startingIndex","lastStringCount","exampleCode","lastIndex","n0","n1","index","preMatch","preMatchLines","nonJSPreface","nonJSPrefaceLineCount","idx","indexOf","charsInLastLine","global","meta","name","processors","examples","postprocess","jsMessages","messages","entries","msg","endColumn","endLine","fatal","messageText","fix","codeCtxLine","codeCtxColumn","startLine","startCol","ret","concat","preprocess","ast","parseForESLint","comment","ecmaVersion","jsdocComments","comments","filter","value","map","start","range","textToStart","parseComment","flatMap","error","console","log","supportsAutofix","exports"],"sources":["../src/getJsdocProcessorPlugin.js"],"sourcesContent":["import {\n forEachPreferredTag,\n getPreferredTagName,\n getRegexFromString,\n getTagDescription,\n hasTag,\n} from './jsdocUtils.js';\nimport {\n parseComment,\n} from '@es-joy/jsdoccomment';\nimport * as espree from 'espree';\nimport {\n readFileSync,\n} from 'node:fs';\nimport {\n join,\n} from 'node:path';\n\n/**\n * @import {\n * Integer,\n * JsdocBlockWithInline,\n * } from './iterateJsdoc.js';\n * @import {\n * ESLint,\n * Linter,\n * } from 'eslint';\n */\n\nconst {\n version,\n} = JSON.parse(\n // @ts-expect-error `Buffer` is ok for `JSON.parse`\n readFileSync(join(import.meta.dirname, '../package.json')),\n);\n\n// const zeroBasedLineIndexAdjust = -1;\nconst likelyNestedJSDocIndentSpace = 1;\nconst preTagSpaceLength = 1;\n\n// If a space is present, we should ignore it\nconst firstLinePrefixLength = preTagSpaceLength;\n\nconst hasCaptionRegex = /^\\s*<caption>([\\s\\S]*?)<\\/caption>/v;\n\n/**\n * @param {string} str\n * @returns {string}\n */\nconst escapeStringRegexp = (str) => {\n return str.replaceAll(/[.*+?^$\\{\\}\\(\\)\\|\\[\\]\\\\]/gv, '\\\\$&');\n};\n\n/**\n * @param {string} str\n * @param {string} ch\n * @returns {Integer}\n */\nconst countChars = (str, ch) => {\n return (str.match(new RegExp(escapeStringRegexp(ch), 'gv')) || []).length;\n};\n\n/**\n * @param {string} text\n * @returns {[\n * Integer,\n * Integer\n * ]}\n */\nconst getLinesCols = (text) => {\n const matchLines = countChars(text, '\\n');\n\n const colDelta = matchLines ?\n text.slice(text.lastIndexOf('\\n') + 1).length :\n text.length;\n\n return [\n matchLines, colDelta,\n ];\n};\n\n/**\n * @typedef {number} Integer\n */\n\n/**\n * @typedef {object} JsdocProcessorOptions\n * @property {boolean} [captionRequired] Require captions for example tags\n * @property {Integer} [paddedIndent] See docs\n * @property {boolean} [checkDefaults] See docs\n * @property {boolean} [checkParams] See docs\n * @property {boolean} [checkExamples] See docs\n * @property {boolean} [checkProperties] See docs\n * @property {string} [matchingFileName] See docs\n * @property {string} [matchingFileNameDefaults] See docs\n * @property {string} [matchingFileNameParams] See docs\n * @property {string} [matchingFileNameProperties] See docs\n * @property {string|RegExp} [exampleCodeRegex] See docs\n * @property {string|RegExp} [rejectExampleCodeRegex] See docs\n * @property {string[]} [allowedLanguagesToProcess] See docs\n * @property {\"script\"|\"module\"} [sourceType] See docs\n * @property {import('eslint').Linter.ESTreeParser|import('eslint').Linter.NonESTreeParser} [parser] See docs\n */\n\n/**\n * We use a function for the ability of the user to pass in a config, but\n * without requiring all users of the plugin to do so.\n * @param {JsdocProcessorOptions} [options]\n * @returns {ESLint.Plugin}\n */\nexport const getJsdocProcessorPlugin = (options = {}) => {\n const {\n allowedLanguagesToProcess = [\n 'js', 'ts', 'javascript', 'typescript',\n ],\n captionRequired = false,\n checkDefaults = false,\n checkExamples = true,\n checkParams = false,\n checkProperties = false,\n exampleCodeRegex = null,\n matchingFileName = null,\n matchingFileNameDefaults = null,\n matchingFileNameParams = null,\n matchingFileNameProperties = null,\n paddedIndent = 0,\n parser = undefined,\n rejectExampleCodeRegex = null,\n sourceType = 'module',\n } = options;\n\n /** @type {RegExp} */\n let exampleCodeRegExp;\n /** @type {RegExp} */\n let rejectExampleCodeRegExp;\n\n if (exampleCodeRegex) {\n exampleCodeRegExp = typeof exampleCodeRegex === 'string' ?\n getRegexFromString(exampleCodeRegex) :\n exampleCodeRegex;\n }\n\n if (rejectExampleCodeRegex) {\n rejectExampleCodeRegExp = typeof rejectExampleCodeRegex === 'string' ?\n getRegexFromString(rejectExampleCodeRegex) :\n rejectExampleCodeRegex;\n }\n\n /**\n * @type {{\n * targetTagName: string,\n * ext: string,\n * codeStartLine: number,\n * codeStartCol: number,\n * nonJSPrefacingCols: number,\n * commentLineCols: [number, number]\n * }[]}\n */\n const otherInfo = [];\n\n /** @type {import('eslint').Linter.LintMessage[]} */\n let extraMessages = [];\n\n /**\n * @param {JsdocBlockWithInline} jsdoc\n * @param {string} jsFileName\n * @param {[number, number]} commentLineCols\n */\n const getTextsAndFileNames = (jsdoc, jsFileName, commentLineCols) => {\n /**\n * @type {{\n * text: string,\n * filename: string|null|undefined\n * }[]}\n */\n const textsAndFileNames = [];\n\n /**\n * @param {{\n * filename: string|null,\n * defaultFileName: string|undefined,\n * source: string,\n * targetTagName: string,\n * rules?: import('eslint').Linter.RulesRecord|undefined,\n * lines?: Integer,\n * cols?: Integer,\n * skipInit?: boolean,\n * ext: string,\n * sources?: {\n * nonJSPrefacingCols: Integer,\n * nonJSPrefacingLines: Integer,\n * string: string,\n * }[],\n * tag?: import('comment-parser').Spec & {\n * line?: Integer,\n * }|{\n * line: Integer,\n * }\n * }} cfg\n */\n const checkSource = ({\n cols = 0,\n defaultFileName,\n ext,\n filename,\n lines = 0,\n skipInit,\n source,\n sources = [],\n tag = {\n line: 0,\n },\n targetTagName,\n }) => {\n if (!skipInit) {\n sources.push({\n nonJSPrefacingCols: cols,\n nonJSPrefacingLines: lines,\n string: source,\n });\n }\n\n /**\n * @param {{\n * nonJSPrefacingCols: Integer,\n * nonJSPrefacingLines: Integer,\n * string: string\n * }} cfg\n */\n const addSourceInfo = function ({\n nonJSPrefacingCols,\n nonJSPrefacingLines,\n string,\n }) {\n const src = paddedIndent ?\n string.replaceAll(new RegExp(`(^|\\n) {${paddedIndent}}(?!$)`, 'gv'), '\\n') :\n string;\n\n // Programmatic ESLint API: https://eslint.org/docs/developer-guide/nodejs-api\n const file = filename || defaultFileName;\n\n if (!('line' in tag)) {\n tag.line = tag.source[0].number;\n }\n\n // NOTE: `tag.line` can be 0 if of form `/** @tag ... */`\n const codeStartLine = /**\n * @type {import('comment-parser').Spec & {\n * line: Integer,\n * }}\n */ (tag).line + nonJSPrefacingLines;\n const codeStartCol = likelyNestedJSDocIndentSpace;\n\n textsAndFileNames.push({\n filename: file,\n text: src,\n });\n otherInfo.push({\n codeStartCol,\n codeStartLine,\n commentLineCols,\n ext,\n nonJSPrefacingCols,\n targetTagName,\n });\n };\n\n for (const targetSource of sources) {\n addSourceInfo(targetSource);\n }\n };\n\n /**\n *\n * @param {string|null} filename\n * @param {string} [ext] Since `eslint-plugin-markdown` v2, and\n * ESLint 7, this is the default which other JS-fenced rules will used.\n * Formerly \"md\" was the default.\n * @returns {{\n * defaultFileName: string|undefined,\n * filename: string|null,\n * ext: string\n * }}\n */\n const getFilenameInfo = (filename, ext = 'md/*.js') => {\n let defaultFileName;\n if (!filename) {\n if (typeof jsFileName === 'string' && jsFileName.includes('.')) {\n defaultFileName = jsFileName.replace(/\\.[^.]*$/v, `.${ext}`);\n } else {\n defaultFileName = `dummy.${ext}`;\n }\n }\n\n return {\n defaultFileName,\n ext,\n filename,\n };\n };\n\n if (checkDefaults) {\n const filenameInfo = getFilenameInfo(matchingFileNameDefaults, 'jsdoc-defaults');\n forEachPreferredTag(jsdoc, 'default', (tag, targetTagName) => {\n if (!tag.description.trim()) {\n return;\n }\n\n checkSource({\n source: `(${getTagDescription(tag)})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n if (checkParams) {\n const filenameInfo = getFilenameInfo(matchingFileNameParams, 'jsdoc-params');\n forEachPreferredTag(jsdoc, 'param', (tag, targetTagName) => {\n if (!tag.default || !tag.default.trim()) {\n return;\n }\n\n checkSource({\n source: `(${tag.default})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n if (checkProperties) {\n const filenameInfo = getFilenameInfo(matchingFileNameProperties, 'jsdoc-properties');\n forEachPreferredTag(jsdoc, 'property', (tag, targetTagName) => {\n if (!tag.default || !tag.default.trim()) {\n return;\n }\n\n checkSource({\n source: `(${tag.default})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n if (!checkExamples) {\n return textsAndFileNames;\n }\n\n const tagName = /** @type {string} */ (getPreferredTagName(jsdoc, {\n tagName: 'example',\n }));\n if (!hasTag(jsdoc, tagName)) {\n return textsAndFileNames;\n }\n\n const matchingFilenameInfo = getFilenameInfo(matchingFileName);\n\n forEachPreferredTag(jsdoc, 'example', (tag, targetTagName) => {\n let source = /** @type {string} */ (getTagDescription(tag));\n const match = source.match(hasCaptionRegex);\n\n if (captionRequired && (!match || !match[1].trim())) {\n extraMessages.push({\n column: commentLineCols[1] + 1,\n line: 1 + commentLineCols[0] + (tag.line ?? tag.source[0].number),\n message: `@${targetTagName} error - Caption is expected for examples.`,\n ruleId: 'jsdoc/example-missing-caption',\n severity: 2,\n });\n return;\n }\n\n source = source.replace(hasCaptionRegex, '');\n const [\n lines,\n cols,\n ] = match ? getLinesCols(match[0]) : [\n 0, 0,\n ];\n\n if (exampleCodeRegex && !exampleCodeRegExp.test(source) ||\n rejectExampleCodeRegex && rejectExampleCodeRegExp.test(source)\n ) {\n return;\n }\n\n // If `allowedLanguagesToProcess` is falsy, all languages should be processed.\n if (allowedLanguagesToProcess) {\n const matches = (/^\\s*```(?<language>\\S+)([\\s\\S]*)```\\s*$/v).exec(source);\n if (matches?.groups && !allowedLanguagesToProcess.includes(\n matches.groups.language.toLowerCase(),\n )) {\n return;\n }\n }\n\n const sources = [];\n let skipInit = false;\n if (exampleCodeRegex) {\n let nonJSPrefacingCols = 0;\n let nonJSPrefacingLines = 0;\n\n let startingIndex = 0;\n let lastStringCount = 0;\n\n let exampleCode;\n exampleCodeRegExp.lastIndex = 0;\n while ((exampleCode = exampleCodeRegExp.exec(source)) !== null) {\n const {\n '0': n0,\n '1': n1,\n index,\n } = exampleCode;\n\n // Count anything preceding user regex match (can affect line numbering)\n const preMatch = source.slice(startingIndex, index);\n\n const [\n preMatchLines,\n colDelta,\n ] = getLinesCols(preMatch);\n\n let nonJSPreface;\n let nonJSPrefaceLineCount;\n if (n1) {\n const idx = n0.indexOf(n1);\n nonJSPreface = n0.slice(0, idx);\n nonJSPrefaceLineCount = countChars(nonJSPreface, '\\n');\n } else {\n nonJSPreface = '';\n nonJSPrefaceLineCount = 0;\n }\n\n nonJSPrefacingLines += lastStringCount + preMatchLines + nonJSPrefaceLineCount;\n\n // Ignore `preMatch` delta if newlines here\n if (nonJSPrefaceLineCount) {\n const charsInLastLine = nonJSPreface.slice(nonJSPreface.lastIndexOf('\\n') + 1).length;\n\n nonJSPrefacingCols += charsInLastLine;\n } else {\n nonJSPrefacingCols += colDelta + nonJSPreface.length;\n }\n\n const string = n1 || n0;\n sources.push({\n nonJSPrefacingCols,\n nonJSPrefacingLines,\n string,\n });\n startingIndex = exampleCodeRegExp.lastIndex;\n lastStringCount = countChars(string, '\\n');\n if (!exampleCodeRegExp.global) {\n break;\n }\n }\n\n skipInit = true;\n }\n\n checkSource({\n cols,\n lines,\n skipInit,\n source,\n sources,\n tag,\n targetTagName,\n ...matchingFilenameInfo,\n });\n });\n\n return textsAndFileNames;\n };\n\n // See https://eslint.org/docs/latest/extend/plugins#processors-in-plugins\n // See https://eslint.org/docs/latest/extend/custom-processors\n // From https://github.com/eslint/eslint/issues/14745#issuecomment-869457265\n /*\n {\n \"files\": [\"*.js\", \"*.ts\"],\n \"processor\": \"jsdoc/example\" // a pretended value here\n },\n {\n \"files\": [\n \"*.js/*_jsdoc-example.js\",\n \"*.ts/*_jsdoc-example.js\",\n \"*.js/*_jsdoc-example.ts\"\n ],\n \"rules\": {\n // specific rules for examples in jsdoc only here\n // And other rules for `.js` and `.ts` will also be enabled for them\n }\n }\n */\n return {\n meta: {\n name: 'eslint-plugin-jsdoc/processor',\n version,\n },\n processors: {\n examples: {\n meta: {\n name: 'eslint-plugin-jsdoc/preprocessor',\n version,\n },\n /**\n * @param {import('eslint').Linter.LintMessage[][]} messages\n * @param {string} filename\n */\n postprocess ([\n jsMessages,\n ...messages\n // eslint-disable-next-line no-unused-vars -- Placeholder\n ], filename) {\n for (const [\n idx,\n message,\n ] of messages.entries()) {\n const {\n codeStartCol,\n codeStartLine,\n commentLineCols,\n nonJSPrefacingCols,\n targetTagName,\n } = otherInfo[idx];\n\n for (const msg of message) {\n const {\n column,\n endColumn,\n endLine,\n fatal,\n line,\n message: messageText,\n ruleId,\n severity,\n\n // Todo: Make fixable\n // fix\n // fix: {range: [number, number], text: string}\n // suggestions: {desc: , messageId:, fix: }[],\n } = msg;\n delete msg.fix;\n\n const [\n codeCtxLine,\n codeCtxColumn,\n ] = commentLineCols;\n const startLine = codeCtxLine + codeStartLine + line;\n\n // Seems to need one more now\n const startCol = 1 +\n codeCtxColumn + codeStartCol + (\n // This might not work for line 0, but line 0 is unlikely for examples\n line <= 1 ? nonJSPrefacingCols + firstLinePrefixLength : preTagSpaceLength\n ) + column;\n\n msg.message = '@' + targetTagName + ' ' + (severity === 2 ? 'error' : 'warning') +\n (ruleId ? ' (' + ruleId + ')' : '') + ': ' +\n (fatal ? 'Fatal: ' : '') +\n messageText;\n msg.line = startLine;\n msg.column = startCol;\n msg.endLine = endLine ? startLine + endLine : startLine;\n // added `- column` to offset what `endColumn` already seemed to include\n msg.endColumn = endColumn ? startCol - column + endColumn : startCol;\n }\n }\n\n const ret = [\n ...jsMessages,\n ].concat(...messages, ...extraMessages);\n extraMessages = [];\n return ret;\n },\n\n /**\n * @param {string} text\n * @param {string} filename\n * @returns {(string | Linter.ProcessorFile)[]}\n */\n preprocess (text, filename) {\n try {\n let ast;\n\n // May be running a second time so catch and ignore\n try {\n ast = parser ?\n // @ts-expect-error Should be present\n parser.parseForESLint(text, {\n comment: true,\n ecmaVersion: 'latest',\n sourceType,\n }).ast :\n espree.parse(text, {\n comment: true,\n ecmaVersion: 'latest',\n sourceType,\n });\n } catch {\n return [\n text,\n ];\n }\n\n /** @type {[number, number][]} */\n const commentLineCols = [];\n const jsdocComments = /** @type {import('estree').Comment[]} */ (\n /**\n * @type {import('estree').Program & {\n * comments?: import('estree').Comment[]\n * }}\n */\n (ast).comments\n ).filter((comment) => {\n return (/^\\*\\s/v).test(comment.value);\n }).map((comment) => {\n const [\n start,\n /* c8 ignore next -- Unsupporting processors only? */\n ] = comment.range ?? [];\n const textToStart = text.slice(0, start);\n\n const [\n lines,\n cols,\n ] = getLinesCols(textToStart);\n\n // const lines = [...textToStart.matchAll(/\\n/gv)].length\n // const lastLinePos = textToStart.lastIndexOf('\\n');\n // const cols = lastLinePos === -1\n // ? 0\n // : textToStart.slice(lastLinePos).length;\n commentLineCols.push([\n lines, cols,\n ]);\n return parseComment(comment);\n });\n\n return [\n text,\n ...jsdocComments.flatMap((jsdoc, idx) => {\n return getTextsAndFileNames(\n jsdoc,\n filename,\n commentLineCols[idx],\n );\n }).filter(\n /**\n * @returns {file is Linter.ProcessorFile}\n */\n (file) => {\n return file !== null && file !== undefined;\n },\n ),\n ];\n /* c8 ignore next 6 */\n } catch (error) {\n // eslint-disable-next-line no-console -- Debugging\n console.log('err', filename, error);\n }\n\n return [];\n },\n supportsAutofix: true,\n },\n },\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAOA,IAAAC,aAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAGA,IAAAK,SAAA,GAAAL,OAAA;AAEmB,SAAAG,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA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AAQ,CAAE5C,IAAI,CAAC4C,OAAO,CAACK,KAAK,CAAC;YACvC,CAAC,CAAC,CAACC,GAAG,CAAEN,OAAO,IAAK;cAClB,MAAM,CACJO;cACA,sDACD,GAAGP,OAAO,CAACQ,KAAK,IAAI,EAAE;cACvB,MAAMC,WAAW,GAAG7H,IAAI,CAACG,KAAK,CAAC,CAAC,EAAEwH,KAAK,CAAC;cAExC,MAAM,CACJrF,KAAK,EACLJ,IAAI,CACL,GAAGnC,YAAY,CAAC8H,WAAW,CAAC;;cAE7B;cACA;cACA;cACA;cACA;cACA9F,eAAe,CAACc,IAAI,CAAC,CACnBP,KAAK,EAAEJ,IAAI,CACZ,CAAC;cACF,OAAO,IAAA4F,0BAAY,EAACV,OAAO,CAAC;YAC9B,CAAC,CAAC;YAEF,OAAO,CACLpH,IAAI,EACJ,GAAGsH,aAAa,CAACS,OAAO,CAAC,CAAClG,KAAK,EAAE4D,GAAG,KAAK;cACvC,OAAO7D,oBAAoB,CACzBC,KAAK,EACLQ,QAAQ,EACRN,eAAe,CAAC0D,GAAG,CACrB,CAAC;YACH,CAAC,CAAC,CAAC+B,MAAM;YACP;AAChB;AACA;YACiBrE,IAAI,IAAK;cACR,OAAOA,IAAI,KAAK,IAAI,IAAIA,IAAI,KAAK/B,SAAS;YAC5C,CACF,CAAC,CACF;YACH;UACA,CAAC,CAAC,OAAO4G,KAAK,EAAE;YACd;YACAC,OAAO,CAACC,GAAG,CAAC,KAAK,EAAE7F,QAAQ,EAAE2F,KAAK,CAAC;UACrC;UAEA,OAAO,EAAE;QACX,CAAC;QACDG,eAAe,EAAE;MACnB;IACF;EACF,CAAC;AACH,CAAC;AAACC,OAAA,CAAA/H,uBAAA,GAAAA,uBAAA","ignoreList":[]}
1
+ {"version":3,"file":"getJsdocProcessorPlugin.cjs","names":["_jsdocUtils","require","_jsdoccomment","espree","_interopRequireWildcard","_nodeFs","_nodePath","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","version","JSON","parse","readFileSync","join","__dirname","likelyNestedJSDocIndentSpace","preTagSpaceLength","firstLinePrefixLength","hasCaptionRegex","escapeStringRegexp","str","replaceAll","countChars","ch","match","RegExp","length","getLinesCols","text","matchLines","colDelta","slice","lastIndexOf","getJsdocProcessorPlugin","options","allowedLanguagesToProcess","captionRequired","checkDefaults","checkExamples","checkParams","checkProperties","exampleCodeRegex","matchingFileName","matchingFileNameDefaults","matchingFileNameParams","matchingFileNameProperties","paddedIndent","parser","undefined","rejectExampleCodeRegex","sourceType","exampleCodeRegExp","rejectExampleCodeRegExp","getRegexFromString","otherInfo","extraMessages","getTextsAndFileNames","jsdoc","jsFileName","commentLineCols","textsAndFileNames","checkSource","cols","defaultFileName","ext","filename","lines","skipInit","source","sources","tag","line","targetTagName","push","nonJSPrefacingCols","nonJSPrefacingLines","string","addSourceInfo","src","file","number","codeStartLine","codeStartCol","targetSource","getFilenameInfo","includes","replace","filenameInfo","forEachPreferredTag","description","trim","getTagDescription","tagName","getPreferredTagName","hasTag","matchingFilenameInfo","column","message","ruleId","severity","test","matches","exec","groups","language","toLowerCase","startingIndex","lastStringCount","exampleCode","lastIndex","n0","n1","index","preMatch","preMatchLines","nonJSPreface","nonJSPrefaceLineCount","idx","indexOf","charsInLastLine","global","meta","name","processors","examples","postprocess","jsMessages","messages","entries","msg","endColumn","endLine","fatal","messageText","fix","codeCtxLine","codeCtxColumn","startLine","startCol","ret","concat","preprocess","ast","parseForESLint","comment","ecmaVersion","jsdocComments","comments","filter","value","map","start","range","textToStart","parseComment","flatMap","error","console","log","supportsAutofix","exports"],"sources":["../src/getJsdocProcessorPlugin.js"],"sourcesContent":["import {\n forEachPreferredTag,\n getPreferredTagName,\n getRegexFromString,\n getTagDescription,\n hasTag,\n} from './jsdocUtils.js';\nimport {\n parseComment,\n} from '@es-joy/jsdoccomment';\nimport * as espree from 'espree';\nimport {\n readFileSync,\n} from 'node:fs';\nimport {\n join,\n} from 'node:path';\n\n/**\n * @import {\n * Integer,\n * JsdocBlockWithInline,\n * } from './iterateJsdoc.js';\n * @import {\n * ESLint,\n * Linter,\n * } from 'eslint';\n */\n\nconst {\n version,\n} = JSON.parse(\n readFileSync(join(import.meta.dirname, '../package.json'), 'utf8'),\n);\n\n// const zeroBasedLineIndexAdjust = -1;\nconst likelyNestedJSDocIndentSpace = 1;\nconst preTagSpaceLength = 1;\n\n// If a space is present, we should ignore it\nconst firstLinePrefixLength = preTagSpaceLength;\n\nconst hasCaptionRegex = /^\\s*<caption>([\\s\\S]*?)<\\/caption>/v;\n\n/**\n * @param {string} str\n * @returns {string}\n */\nconst escapeStringRegexp = (str) => {\n return str.replaceAll(/[.*+?^$\\{\\}\\(\\)\\|\\[\\]\\\\]/gv, '\\\\$&');\n};\n\n/**\n * @param {string} str\n * @param {string} ch\n * @returns {Integer}\n */\nconst countChars = (str, ch) => {\n return (str.match(new RegExp(escapeStringRegexp(ch), 'gv')) || []).length;\n};\n\n/**\n * @param {string} text\n * @returns {[\n * Integer,\n * Integer\n * ]}\n */\nconst getLinesCols = (text) => {\n const matchLines = countChars(text, '\\n');\n\n const colDelta = matchLines ?\n text.slice(text.lastIndexOf('\\n') + 1).length :\n text.length;\n\n return [\n matchLines, colDelta,\n ];\n};\n\n/**\n * @typedef {number} Integer\n */\n\n/**\n * @typedef {object} JsdocProcessorOptions\n * @property {boolean} [captionRequired] Require captions for example tags\n * @property {Integer} [paddedIndent] See docs\n * @property {boolean} [checkDefaults] See docs\n * @property {boolean} [checkParams] See docs\n * @property {boolean} [checkExamples] See docs\n * @property {boolean} [checkProperties] See docs\n * @property {string} [matchingFileName] See docs\n * @property {string} [matchingFileNameDefaults] See docs\n * @property {string} [matchingFileNameParams] See docs\n * @property {string} [matchingFileNameProperties] See docs\n * @property {string|RegExp} [exampleCodeRegex] See docs\n * @property {string|RegExp} [rejectExampleCodeRegex] See docs\n * @property {string[]} [allowedLanguagesToProcess] See docs\n * @property {\"script\"|\"module\"} [sourceType] See docs\n * @property {import('eslint').Linter.ESTreeParser|import('eslint').Linter.NonESTreeParser} [parser] See docs\n */\n\n/**\n * We use a function for the ability of the user to pass in a config, but\n * without requiring all users of the plugin to do so.\n * @param {JsdocProcessorOptions} [options]\n * @returns {ESLint.Plugin}\n */\nexport const getJsdocProcessorPlugin = (options = {}) => {\n const {\n allowedLanguagesToProcess = [\n 'js', 'ts', 'javascript', 'typescript',\n ],\n captionRequired = false,\n checkDefaults = false,\n checkExamples = true,\n checkParams = false,\n checkProperties = false,\n exampleCodeRegex = null,\n matchingFileName = null,\n matchingFileNameDefaults = null,\n matchingFileNameParams = null,\n matchingFileNameProperties = null,\n paddedIndent = 0,\n parser = undefined,\n rejectExampleCodeRegex = null,\n sourceType = 'module',\n } = options;\n\n /** @type {RegExp} */\n let exampleCodeRegExp;\n /** @type {RegExp} */\n let rejectExampleCodeRegExp;\n\n if (exampleCodeRegex) {\n exampleCodeRegExp = typeof exampleCodeRegex === 'string' ?\n getRegexFromString(exampleCodeRegex) :\n exampleCodeRegex;\n }\n\n if (rejectExampleCodeRegex) {\n rejectExampleCodeRegExp = typeof rejectExampleCodeRegex === 'string' ?\n getRegexFromString(rejectExampleCodeRegex) :\n rejectExampleCodeRegex;\n }\n\n /**\n * @type {{\n * targetTagName: string,\n * ext: string,\n * codeStartLine: number,\n * codeStartCol: number,\n * nonJSPrefacingCols: number,\n * commentLineCols: [number, number]\n * }[]}\n */\n const otherInfo = [];\n\n /** @type {import('eslint').Linter.LintMessage[]} */\n let extraMessages = [];\n\n /**\n * @param {JsdocBlockWithInline} jsdoc\n * @param {string} jsFileName\n * @param {[number, number]} commentLineCols\n */\n const getTextsAndFileNames = (jsdoc, jsFileName, commentLineCols) => {\n /**\n * @type {{\n * text: string,\n * filename: string|null|undefined\n * }[]}\n */\n const textsAndFileNames = [];\n\n /**\n * @param {{\n * filename: string|null,\n * defaultFileName: string|undefined,\n * source: string,\n * targetTagName: string,\n * rules?: import('eslint').Linter.RulesRecord|undefined,\n * lines?: Integer,\n * cols?: Integer,\n * skipInit?: boolean,\n * ext: string,\n * sources?: {\n * nonJSPrefacingCols: Integer,\n * nonJSPrefacingLines: Integer,\n * string: string,\n * }[],\n * tag?: import('comment-parser').Spec & {\n * line?: Integer,\n * }|{\n * line: Integer,\n * }\n * }} cfg\n */\n const checkSource = ({\n cols = 0,\n defaultFileName,\n ext,\n filename,\n lines = 0,\n skipInit,\n source,\n sources = [],\n tag = {\n line: 0,\n },\n targetTagName,\n }) => {\n if (!skipInit) {\n sources.push({\n nonJSPrefacingCols: cols,\n nonJSPrefacingLines: lines,\n string: source,\n });\n }\n\n /**\n * @param {{\n * nonJSPrefacingCols: Integer,\n * nonJSPrefacingLines: Integer,\n * string: string\n * }} cfg\n */\n const addSourceInfo = function ({\n nonJSPrefacingCols,\n nonJSPrefacingLines,\n string,\n }) {\n const src = paddedIndent ?\n string.replaceAll(new RegExp(`(^|\\n) {${paddedIndent}}(?!$)`, 'gv'), '\\n') :\n string;\n\n // Programmatic ESLint API: https://eslint.org/docs/developer-guide/nodejs-api\n const file = filename || defaultFileName;\n\n if (!('line' in tag)) {\n tag.line = tag.source[0].number;\n }\n\n // NOTE: `tag.line` can be 0 if of form `/** @tag ... */`\n const codeStartLine = /**\n * @type {import('comment-parser').Spec & {\n * line: Integer,\n * }}\n */ (tag).line + nonJSPrefacingLines;\n const codeStartCol = likelyNestedJSDocIndentSpace;\n\n textsAndFileNames.push({\n filename: file,\n text: src,\n });\n otherInfo.push({\n codeStartCol,\n codeStartLine,\n commentLineCols,\n ext,\n nonJSPrefacingCols,\n targetTagName,\n });\n };\n\n for (const targetSource of sources) {\n addSourceInfo(targetSource);\n }\n };\n\n /**\n *\n * @param {string|null} filename\n * @param {string} [ext] Since `eslint-plugin-markdown` v2, and\n * ESLint 7, this is the default which other JS-fenced rules will used.\n * Formerly \"md\" was the default.\n * @returns {{\n * defaultFileName: string|undefined,\n * filename: string|null,\n * ext: string\n * }}\n */\n const getFilenameInfo = (filename, ext = 'md/*.js') => {\n let defaultFileName;\n if (!filename) {\n if (typeof jsFileName === 'string' && jsFileName.includes('.')) {\n defaultFileName = jsFileName.replace(/\\.[^.]*$/v, `.${ext}`);\n } else {\n defaultFileName = `dummy.${ext}`;\n }\n }\n\n return {\n defaultFileName,\n ext,\n filename,\n };\n };\n\n if (checkDefaults) {\n const filenameInfo = getFilenameInfo(matchingFileNameDefaults, 'jsdoc-defaults');\n forEachPreferredTag(jsdoc, 'default', (tag, targetTagName) => {\n if (!tag.description.trim()) {\n return;\n }\n\n checkSource({\n source: `(${getTagDescription(tag)})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n if (checkParams) {\n const filenameInfo = getFilenameInfo(matchingFileNameParams, 'jsdoc-params');\n forEachPreferredTag(jsdoc, 'param', (tag, targetTagName) => {\n if (!tag.default || !tag.default.trim()) {\n return;\n }\n\n checkSource({\n source: `(${tag.default})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n if (checkProperties) {\n const filenameInfo = getFilenameInfo(matchingFileNameProperties, 'jsdoc-properties');\n forEachPreferredTag(jsdoc, 'property', (tag, targetTagName) => {\n if (!tag.default || !tag.default.trim()) {\n return;\n }\n\n checkSource({\n source: `(${tag.default})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n if (!checkExamples) {\n return textsAndFileNames;\n }\n\n const tagName = /** @type {string} */ (getPreferredTagName(jsdoc, {\n tagName: 'example',\n }));\n if (!hasTag(jsdoc, tagName)) {\n return textsAndFileNames;\n }\n\n const matchingFilenameInfo = getFilenameInfo(matchingFileName);\n\n forEachPreferredTag(jsdoc, 'example', (tag, targetTagName) => {\n let source = /** @type {string} */ (getTagDescription(tag));\n const match = source.match(hasCaptionRegex);\n\n if (captionRequired && (!match || !match[1].trim())) {\n extraMessages.push({\n column: commentLineCols[1] + 1,\n line: 1 + commentLineCols[0] + (tag.line ?? tag.source[0].number),\n message: `@${targetTagName} error - Caption is expected for examples.`,\n ruleId: 'jsdoc/example-missing-caption',\n severity: 2,\n });\n return;\n }\n\n source = source.replace(hasCaptionRegex, '');\n const [\n lines,\n cols,\n ] = match ? getLinesCols(match[0]) : [\n 0, 0,\n ];\n\n if (exampleCodeRegex && !exampleCodeRegExp.test(source) ||\n rejectExampleCodeRegex && rejectExampleCodeRegExp.test(source)\n ) {\n return;\n }\n\n // If `allowedLanguagesToProcess` is falsy, all languages should be processed.\n if (allowedLanguagesToProcess) {\n const matches = (/^\\s*```(?<language>\\S+)([\\s\\S]*)```\\s*$/v).exec(source);\n if (matches?.groups && !allowedLanguagesToProcess.includes(\n matches.groups.language.toLowerCase(),\n )) {\n return;\n }\n }\n\n const sources = [];\n let skipInit = false;\n if (exampleCodeRegex) {\n let nonJSPrefacingCols = 0;\n let nonJSPrefacingLines = 0;\n\n let startingIndex = 0;\n let lastStringCount = 0;\n\n let exampleCode;\n exampleCodeRegExp.lastIndex = 0;\n while ((exampleCode = exampleCodeRegExp.exec(source)) !== null) {\n const {\n '0': n0,\n '1': n1,\n index,\n } = exampleCode;\n\n // Count anything preceding user regex match (can affect line numbering)\n const preMatch = source.slice(startingIndex, index);\n\n const [\n preMatchLines,\n colDelta,\n ] = getLinesCols(preMatch);\n\n let nonJSPreface;\n let nonJSPrefaceLineCount;\n if (n1) {\n const idx = n0.indexOf(n1);\n nonJSPreface = n0.slice(0, idx);\n nonJSPrefaceLineCount = countChars(nonJSPreface, '\\n');\n } else {\n nonJSPreface = '';\n nonJSPrefaceLineCount = 0;\n }\n\n nonJSPrefacingLines += lastStringCount + preMatchLines + nonJSPrefaceLineCount;\n\n // Ignore `preMatch` delta if newlines here\n if (nonJSPrefaceLineCount) {\n const charsInLastLine = nonJSPreface.slice(nonJSPreface.lastIndexOf('\\n') + 1).length;\n\n nonJSPrefacingCols += charsInLastLine;\n } else {\n nonJSPrefacingCols += colDelta + nonJSPreface.length;\n }\n\n const string = n1 || n0;\n sources.push({\n nonJSPrefacingCols,\n nonJSPrefacingLines,\n string,\n });\n startingIndex = exampleCodeRegExp.lastIndex;\n lastStringCount = countChars(string, '\\n');\n if (!exampleCodeRegExp.global) {\n break;\n }\n }\n\n skipInit = true;\n }\n\n checkSource({\n cols,\n lines,\n skipInit,\n source,\n sources,\n tag,\n targetTagName,\n ...matchingFilenameInfo,\n });\n });\n\n return textsAndFileNames;\n };\n\n // See https://eslint.org/docs/latest/extend/plugins#processors-in-plugins\n // See https://eslint.org/docs/latest/extend/custom-processors\n // From https://github.com/eslint/eslint/issues/14745#issuecomment-869457265\n /*\n {\n \"files\": [\"*.js\", \"*.ts\"],\n \"processor\": \"jsdoc/example\" // a pretended value here\n },\n {\n \"files\": [\n \"*.js/*_jsdoc-example.js\",\n \"*.ts/*_jsdoc-example.js\",\n \"*.js/*_jsdoc-example.ts\"\n ],\n \"rules\": {\n // specific rules for examples in jsdoc only here\n // And other rules for `.js` and `.ts` will also be enabled for them\n }\n }\n */\n return {\n meta: {\n name: 'eslint-plugin-jsdoc/processor',\n version,\n },\n processors: {\n examples: {\n meta: {\n name: 'eslint-plugin-jsdoc/preprocessor',\n version,\n },\n /**\n * @param {import('eslint').Linter.LintMessage[][]} messages\n * @param {string} filename\n */\n postprocess ([\n jsMessages,\n ...messages\n // eslint-disable-next-line no-unused-vars -- Placeholder\n ], filename) {\n for (const [\n idx,\n message,\n ] of messages.entries()) {\n const {\n codeStartCol,\n codeStartLine,\n commentLineCols,\n nonJSPrefacingCols,\n targetTagName,\n } = otherInfo[idx];\n\n for (const msg of message) {\n const {\n column,\n endColumn,\n endLine,\n fatal,\n line,\n message: messageText,\n ruleId,\n severity,\n\n // Todo: Make fixable\n // fix\n // fix: {range: [number, number], text: string}\n // suggestions: {desc: , messageId:, fix: }[],\n } = msg;\n delete msg.fix;\n\n const [\n codeCtxLine,\n codeCtxColumn,\n ] = commentLineCols;\n const startLine = codeCtxLine + codeStartLine + line;\n\n // Seems to need one more now\n const startCol = 1 +\n codeCtxColumn + codeStartCol + (\n // This might not work for line 0, but line 0 is unlikely for examples\n line <= 1 ? nonJSPrefacingCols + firstLinePrefixLength : preTagSpaceLength\n ) + column;\n\n msg.message = '@' + targetTagName + ' ' + (severity === 2 ? 'error' : 'warning') +\n (ruleId ? ' (' + ruleId + ')' : '') + ': ' +\n (fatal ? 'Fatal: ' : '') +\n messageText;\n msg.line = startLine;\n msg.column = startCol;\n msg.endLine = endLine ? startLine + endLine : startLine;\n // added `- column` to offset what `endColumn` already seemed to include\n msg.endColumn = endColumn ? startCol - column + endColumn : startCol;\n }\n }\n\n const ret = [\n ...jsMessages,\n ].concat(...messages, ...extraMessages);\n extraMessages = [];\n return ret;\n },\n\n /**\n * @param {string} text\n * @param {string} filename\n * @returns {(string | Linter.ProcessorFile)[]}\n */\n preprocess (text, filename) {\n try {\n let ast;\n\n // May be running a second time so catch and ignore\n try {\n ast = parser ?\n // @ts-expect-error Should be present\n parser.parseForESLint(text, {\n comment: true,\n ecmaVersion: 'latest',\n sourceType,\n }).ast :\n espree.parse(text, {\n comment: true,\n ecmaVersion: 'latest',\n sourceType,\n });\n } catch {\n return [\n text,\n ];\n }\n\n /** @type {[number, number][]} */\n const commentLineCols = [];\n const jsdocComments = /** @type {import('estree').Comment[]} */ (\n /**\n * @type {import('estree').Program & {\n * comments?: import('estree').Comment[]\n * }}\n */\n (ast).comments\n ).filter((comment) => {\n return (/^\\*\\s/v).test(comment.value);\n }).map((comment) => {\n const [\n start,\n /* c8 ignore next -- Unsupporting processors only? */\n ] = comment.range ?? [];\n const textToStart = text.slice(0, start);\n\n const [\n lines,\n cols,\n ] = getLinesCols(textToStart);\n\n // const lines = [...textToStart.matchAll(/\\n/gv)].length\n // const lastLinePos = textToStart.lastIndexOf('\\n');\n // const cols = lastLinePos === -1\n // ? 0\n // : textToStart.slice(lastLinePos).length;\n commentLineCols.push([\n lines, cols,\n ]);\n return parseComment(comment);\n });\n\n return [\n text,\n ...jsdocComments.flatMap((jsdoc, idx) => {\n return getTextsAndFileNames(\n jsdoc,\n filename,\n commentLineCols[idx],\n );\n }).filter(\n /**\n * @returns {file is Linter.ProcessorFile}\n */\n (file) => {\n return file !== null && file !== undefined;\n },\n ),\n ];\n /* c8 ignore next 6 */\n } catch (error) {\n // eslint-disable-next-line no-console -- Debugging\n console.log('err', filename, error);\n }\n\n return [];\n },\n supportsAutofix: true,\n },\n },\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAOA,IAAAC,aAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAGA,IAAAK,SAAA,GAAAL,OAAA;AAEmB,SAAAG,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,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C,OAAO7D,oBAAoB,CACzBC,KAAK,EACLQ,QAAQ,EACRN,eAAe,CAAC0D,GAAG,CACrB,CAAC;YACH,CAAC,CAAC,CAAC+B,MAAM;YACP;AAChB;AACA;YACiBrE,IAAI,IAAK;cACR,OAAOA,IAAI,KAAK,IAAI,IAAIA,IAAI,KAAK/B,SAAS;YAC5C,CACF,CAAC,CACF;YACH;UACA,CAAC,CAAC,OAAO4G,KAAK,EAAE;YACd;YACAC,OAAO,CAACC,GAAG,CAAC,KAAK,EAAE7F,QAAQ,EAAE2F,KAAK,CAAC;UACrC;UAEA,OAAO,EAAE;QACX,CAAC;QACDG,eAAe,EAAE;MACnB;IACF;EACF,CAAC;AACH,CAAC;AAACC,OAAA,CAAA/H,uBAAA,GAAAA,uBAAA","ignoreList":[]}
@@ -72,7 +72,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
72
72
  * @typedef {"" | "-error"} ErrorLevelVariants
73
73
  * @type {import('eslint').ESLint.Plugin & {
74
74
  * configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,
75
- * import('eslint').Linter.Config>|Record<"examples"|"default-expressions"|"examples-and-default-expressions", import('eslint').Linter.Config[]>
75
+ * import('eslint').Linter.Config> & Record<"examples"|"default-expressions"|"examples-and-default-expressions", import('eslint').Linter.Config[]>
76
76
  * }}
77
77
  */
78
78
  const index = {};
@@ -1 +1 @@
1
- {"version":3,"file":"index-cjs.cjs","names":["_buildForbidRuleDefinition","require","_getJsdocProcessorPlugin","_checkAccess","_interopRequireDefault","_checkAlignment","_checkExamples","_checkIndentation","_checkLineAlignment","_checkParamNames","_checkPropertyNames","_checkSyntax","_checkTagNames","_checkTemplateNames","_checkTypes","_checkValues","_convertToJsdocComments","_emptyTags","_implementsOnClasses","_importsAsDependencies","_informativeDocs","_linesBeforeBlock","_matchDescription","_matchName","_multilineBlocks","_noBadBlocks","_noBlankBlockDescriptions","_noBlankBlocks","_noDefaults","_noMissingSyntax","_noMultiAsterisks","_noRestrictedSyntax","_noTypes","_noUndefinedTypes","_requireAsteriskPrefix","_requireDescription","_requireDescriptionCompleteSentence","_requireExample","_requireFileOverview","_requireHyphenBeforeParamDescription","_requireJsdoc","_requireParam","_requireParamDescription","_requireParamName","_requireParamType","_requireProperty","_requirePropertyDescription","_requirePropertyName","_requirePropertyType","_requireReturns","_requireReturnsCheck","_requireReturnsDescription","_requireReturnsType","_requireTemplate","_requireThrows","_requireYields","_requireYieldsCheck","_sortTags","_tagLines","_textEscaping","_typeFormatting","_validTypes","e","__esModule","default","index","configs","rules","checkAccess","checkAlignment","checkExamples","checkIndentation","checkLineAlignment","checkParamNames","checkPropertyNames","checkSyntax","checkTagNames","checkTemplateNames","checkTypes","checkValues","convertToJsdocComments","emptyTags","implementsOnClasses","importsAsDependencies","informativeDocs","linesBeforeBlock","matchDescription","matchName","multilineBlocks","noBadBlocks","noBlankBlockDescriptions","noBlankBlocks","noDefaults","noMissingSyntax","noMultiAsterisks","noRestrictedSyntax","noTypes","noUndefinedTypes","requireAsteriskPrefix","requireDescription","requireDescriptionCompleteSentence","requireExample","requireFileOverview","requireHyphenBeforeParamDescription","requireJsdoc","buildForbidRuleDefinition","contexts","comment","context","message","description","url","requireParam","requireParamDescription","requireParamName","requireParamType","requireProperty","requirePropertyDescription","requirePropertyName","requirePropertyType","requireReturns","requireReturnsCheck","requireReturnsDescription","requireReturnsType","requireTemplate","requireThrows","requireYields","requireYieldsCheck","sortTags","tagLines","textEscaping","typeFormatting","validTypes","createRecommendedRuleset","warnOrError","flatName","name","plugins","jsdoc","createRecommendedTypeScriptRuleset","ruleset","typed","createRecommendedTypeScriptFlavorRuleset","createStandaloneRulesetFactory","ruleNames","Object","fromEntries","map","ruleName","slice","contentsRules","escapeHTML","createContentsTypescriptRuleset","createContentsTypescriptFlavorRuleset","logicalRules","createLogicalTypescriptRuleset","createLogicalTypescriptFlavorRuleset","requirementsRules","createRequirementsTypeScriptRuleset","createRequirementsTypeScriptFlavorRuleset","stylisticRules","createStylisticTypeScriptRuleset","createStylisticTypeScriptFlavorRuleset","Error","recommended","examples","files","getJsdocProcessorPlugin","processor","checkDefaults","checkParams","checkProperties","quotes","semi","strict","config","_default","exports","module"],"sources":["../src/index-cjs.js"],"sourcesContent":["import {\n buildForbidRuleDefinition,\n} from './buildForbidRuleDefinition.js';\nimport {\n getJsdocProcessorPlugin,\n} from './getJsdocProcessorPlugin.js';\nimport checkAccess from './rules/checkAccess.js';\nimport checkAlignment from './rules/checkAlignment.js';\nimport checkExamples from './rules/checkExamples.js';\nimport checkIndentation from './rules/checkIndentation.js';\nimport checkLineAlignment from './rules/checkLineAlignment.js';\nimport checkParamNames from './rules/checkParamNames.js';\nimport checkPropertyNames from './rules/checkPropertyNames.js';\nimport checkSyntax from './rules/checkSyntax.js';\nimport checkTagNames from './rules/checkTagNames.js';\nimport checkTemplateNames from './rules/checkTemplateNames.js';\nimport checkTypes from './rules/checkTypes.js';\nimport checkValues from './rules/checkValues.js';\nimport convertToJsdocComments from './rules/convertToJsdocComments.js';\nimport emptyTags from './rules/emptyTags.js';\nimport implementsOnClasses from './rules/implementsOnClasses.js';\nimport importsAsDependencies from './rules/importsAsDependencies.js';\nimport informativeDocs from './rules/informativeDocs.js';\nimport linesBeforeBlock from './rules/linesBeforeBlock.js';\nimport matchDescription from './rules/matchDescription.js';\nimport matchName from './rules/matchName.js';\nimport multilineBlocks from './rules/multilineBlocks.js';\nimport noBadBlocks from './rules/noBadBlocks.js';\nimport noBlankBlockDescriptions from './rules/noBlankBlockDescriptions.js';\nimport noBlankBlocks from './rules/noBlankBlocks.js';\nimport noDefaults from './rules/noDefaults.js';\nimport noMissingSyntax from './rules/noMissingSyntax.js';\nimport noMultiAsterisks from './rules/noMultiAsterisks.js';\nimport noRestrictedSyntax from './rules/noRestrictedSyntax.js';\nimport noTypes from './rules/noTypes.js';\nimport noUndefinedTypes from './rules/noUndefinedTypes.js';\nimport requireAsteriskPrefix from './rules/requireAsteriskPrefix.js';\nimport requireDescription from './rules/requireDescription.js';\nimport requireDescriptionCompleteSentence from './rules/requireDescriptionCompleteSentence.js';\nimport requireExample from './rules/requireExample.js';\nimport requireFileOverview from './rules/requireFileOverview.js';\nimport requireHyphenBeforeParamDescription from './rules/requireHyphenBeforeParamDescription.js';\nimport requireJsdoc from './rules/requireJsdoc.js';\nimport requireParam from './rules/requireParam.js';\nimport requireParamDescription from './rules/requireParamDescription.js';\nimport requireParamName from './rules/requireParamName.js';\nimport requireParamType from './rules/requireParamType.js';\nimport requireProperty from './rules/requireProperty.js';\nimport requirePropertyDescription from './rules/requirePropertyDescription.js';\nimport requirePropertyName from './rules/requirePropertyName.js';\nimport requirePropertyType from './rules/requirePropertyType.js';\nimport requireReturns from './rules/requireReturns.js';\nimport requireReturnsCheck from './rules/requireReturnsCheck.js';\nimport requireReturnsDescription from './rules/requireReturnsDescription.js';\nimport requireReturnsType from './rules/requireReturnsType.js';\nimport requireTemplate from './rules/requireTemplate.js';\nimport requireThrows from './rules/requireThrows.js';\nimport requireYields from './rules/requireYields.js';\nimport requireYieldsCheck from './rules/requireYieldsCheck.js';\nimport sortTags from './rules/sortTags.js';\nimport tagLines from './rules/tagLines.js';\nimport textEscaping from './rules/textEscaping.js';\nimport typeFormatting from './rules/typeFormatting.js';\nimport validTypes from './rules/validTypes.js';\n\n/* eslint-disable jsdoc/valid-types -- Bug */\n/**\n * @typedef {\"recommended\" | \"stylistic\" | \"contents\" | \"logical\" | \"requirements\"} ConfigGroups\n * @typedef {\"\" | \"-typescript\" | \"-typescript-flavor\"} ConfigVariants\n * @typedef {\"\" | \"-error\"} ErrorLevelVariants\n * @type {import('eslint').ESLint.Plugin & {\n * configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,\n * import('eslint').Linter.Config>|Record<\"examples\"|\"default-expressions\"|\"examples-and-default-expressions\", import('eslint').Linter.Config[]>\n * }}\n */\nconst index = {};\n/* eslint-enable jsdoc/valid-types -- Bug */\nindex.configs = {};\nindex.rules = {\n 'check-access': checkAccess,\n 'check-alignment': checkAlignment,\n 'check-examples': checkExamples,\n 'check-indentation': checkIndentation,\n 'check-line-alignment': checkLineAlignment,\n 'check-param-names': checkParamNames,\n 'check-property-names': checkPropertyNames,\n 'check-syntax': checkSyntax,\n 'check-tag-names': checkTagNames,\n 'check-template-names': checkTemplateNames,\n 'check-types': checkTypes,\n 'check-values': checkValues,\n 'convert-to-jsdoc-comments': convertToJsdocComments,\n 'empty-tags': emptyTags,\n 'implements-on-classes': implementsOnClasses,\n 'imports-as-dependencies': importsAsDependencies,\n 'informative-docs': informativeDocs,\n 'lines-before-block': linesBeforeBlock,\n 'match-description': matchDescription,\n 'match-name': matchName,\n 'multiline-blocks': multilineBlocks,\n 'no-bad-blocks': noBadBlocks,\n 'no-blank-block-descriptions': noBlankBlockDescriptions,\n 'no-blank-blocks': noBlankBlocks,\n 'no-defaults': noDefaults,\n 'no-missing-syntax': noMissingSyntax,\n 'no-multi-asterisks': noMultiAsterisks,\n 'no-restricted-syntax': noRestrictedSyntax,\n 'no-types': noTypes,\n 'no-undefined-types': noUndefinedTypes,\n 'require-asterisk-prefix': requireAsteriskPrefix,\n 'require-description': requireDescription,\n 'require-description-complete-sentence': requireDescriptionCompleteSentence,\n 'require-example': requireExample,\n 'require-file-overview': requireFileOverview,\n 'require-hyphen-before-param-description': requireHyphenBeforeParamDescription,\n 'require-jsdoc': requireJsdoc,\n 'require-next-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=next]:not([parsedType.type]))',\n context: 'any',\n message: '@next should have a type',\n },\n ],\n description: 'Requires a type for @next tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-type.md#repos-sticky-header',\n }),\n 'require-param': requireParam,\n 'require-param-description': requireParamDescription,\n 'require-param-name': requireParamName,\n 'require-param-type': requireParamType,\n 'require-property': requireProperty,\n 'require-property-description': requirePropertyDescription,\n 'require-property-name': requirePropertyName,\n 'require-property-type': requirePropertyType,\n 'require-returns': requireReturns,\n 'require-returns-check': requireReturnsCheck,\n 'require-returns-description': requireReturnsDescription,\n 'require-returns-type': requireReturnsType,\n 'require-template': requireTemplate,\n 'require-throws': requireThrows,\n 'require-throws-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=throws]:not([parsedType.type]))',\n context: 'any',\n message: '@throws should have a type',\n },\n ],\n description: 'Requires a type for @throws tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-type.md#repos-sticky-header',\n }),\n 'require-yields': requireYields,\n 'require-yields-check': requireYieldsCheck,\n 'require-yields-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=yields]:not([parsedType.type]))',\n context: 'any',\n message: '@yields should have a type',\n },\n ],\n description: 'Requires a type for @yields tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-type.md#repos-sticky-header',\n }),\n 'sort-tags': sortTags,\n 'tag-lines': tagLines,\n 'text-escaping': textEscaping,\n 'type-formatting': typeFormatting,\n 'valid-types': validTypes,\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedRuleset = (warnOrError, flatName) => {\n return {\n ...(flatName ? {\n name: 'jsdoc/' + flatName,\n } : {}),\n // @ts-expect-error ESLint 8 plugins\n plugins:\n flatName ? {\n jsdoc: index,\n } : [\n 'jsdoc',\n ],\n rules: {\n 'jsdoc/check-access': warnOrError,\n 'jsdoc/check-alignment': warnOrError,\n 'jsdoc/check-examples': 'off',\n 'jsdoc/check-indentation': 'off',\n 'jsdoc/check-line-alignment': 'off',\n 'jsdoc/check-param-names': warnOrError,\n 'jsdoc/check-property-names': warnOrError,\n 'jsdoc/check-syntax': 'off',\n 'jsdoc/check-tag-names': warnOrError,\n 'jsdoc/check-template-names': 'off',\n 'jsdoc/check-types': warnOrError,\n 'jsdoc/check-values': warnOrError,\n 'jsdoc/convert-to-jsdoc-comments': 'off',\n 'jsdoc/empty-tags': warnOrError,\n 'jsdoc/implements-on-classes': warnOrError,\n 'jsdoc/imports-as-dependencies': 'off',\n 'jsdoc/informative-docs': 'off',\n 'jsdoc/lines-before-block': 'off',\n 'jsdoc/match-description': 'off',\n 'jsdoc/match-name': 'off',\n 'jsdoc/multiline-blocks': warnOrError,\n 'jsdoc/no-bad-blocks': 'off',\n 'jsdoc/no-blank-block-descriptions': 'off',\n 'jsdoc/no-blank-blocks': 'off',\n 'jsdoc/no-defaults': warnOrError,\n 'jsdoc/no-missing-syntax': 'off',\n 'jsdoc/no-multi-asterisks': warnOrError,\n 'jsdoc/no-restricted-syntax': 'off',\n 'jsdoc/no-types': 'off',\n 'jsdoc/no-undefined-types': warnOrError,\n 'jsdoc/require-asterisk-prefix': 'off',\n 'jsdoc/require-description': 'off',\n 'jsdoc/require-description-complete-sentence': 'off',\n 'jsdoc/require-example': 'off',\n 'jsdoc/require-file-overview': 'off',\n 'jsdoc/require-hyphen-before-param-description': 'off',\n 'jsdoc/require-jsdoc': warnOrError,\n 'jsdoc/require-next-type': warnOrError,\n 'jsdoc/require-param': warnOrError,\n 'jsdoc/require-param-description': warnOrError,\n 'jsdoc/require-param-name': warnOrError,\n 'jsdoc/require-param-type': warnOrError,\n 'jsdoc/require-property': warnOrError,\n 'jsdoc/require-property-description': warnOrError,\n 'jsdoc/require-property-name': warnOrError,\n 'jsdoc/require-property-type': warnOrError,\n 'jsdoc/require-returns': warnOrError,\n 'jsdoc/require-returns-check': warnOrError,\n 'jsdoc/require-returns-description': warnOrError,\n 'jsdoc/require-returns-type': warnOrError,\n 'jsdoc/require-template': 'off',\n 'jsdoc/require-throws': 'off',\n 'jsdoc/require-throws-type': warnOrError,\n 'jsdoc/require-yields': warnOrError,\n 'jsdoc/require-yields-check': warnOrError,\n 'jsdoc/require-yields-type': warnOrError,\n 'jsdoc/sort-tags': 'off',\n 'jsdoc/tag-lines': warnOrError,\n 'jsdoc/text-escaping': 'off',\n 'jsdoc/type-formatting': 'off',\n 'jsdoc/valid-types': warnOrError,\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedTypeScriptRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedRuleset(warnOrError, flatName);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable @stylistic/indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/check-tag-names': [\n warnOrError, {\n typed: true,\n },\n ],\n 'jsdoc/no-types': warnOrError,\n 'jsdoc/no-undefined-types': 'off',\n 'jsdoc/require-param-type': 'off',\n 'jsdoc/require-property-type': 'off',\n 'jsdoc/require-returns-type': 'off',\n /* eslint-enable @stylistic/indent */\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedTypeScriptFlavorRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedRuleset(warnOrError, flatName);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable @stylistic/indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/no-undefined-types': 'off',\n /* eslint-enable @stylistic/indent */\n },\n };\n};\n\n/**\n * @param {(string | unknown[])[]} ruleNames\n */\nconst createStandaloneRulesetFactory = (ruleNames) => {\n /**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\n return (warnOrError, flatName) => {\n return {\n name: 'jsdoc/' + flatName,\n plugins: {\n jsdoc: index,\n },\n rules: Object.fromEntries(\n ruleNames.map(\n (ruleName) => {\n return (typeof ruleName === 'string' ?\n [\n ruleName, warnOrError,\n ] :\n [\n ruleName[0], [\n warnOrError, ...ruleName.slice(1),\n ],\n ]);\n },\n ),\n ),\n };\n };\n};\n\nconst contentsRules = [\n 'jsdoc/informative-docs',\n 'jsdoc/match-description',\n 'jsdoc/no-blank-block-descriptions',\n 'jsdoc/no-blank-blocks',\n [\n 'jsdoc/text-escaping', {\n escapeHTML: true,\n },\n ],\n];\n\nconst createContentsTypescriptRuleset = createStandaloneRulesetFactory(contentsRules);\n\nconst createContentsTypescriptFlavorRuleset = createStandaloneRulesetFactory(contentsRules);\n\nconst logicalRules = [\n 'jsdoc/check-access',\n 'jsdoc/check-param-names',\n 'jsdoc/check-property-names',\n 'jsdoc/check-syntax',\n 'jsdoc/check-tag-names',\n 'jsdoc/check-template-names',\n 'jsdoc/check-types',\n 'jsdoc/check-values',\n 'jsdoc/empty-tags',\n 'jsdoc/implements-on-classes',\n 'jsdoc/require-returns-check',\n 'jsdoc/require-yields-check',\n 'jsdoc/no-bad-blocks',\n 'jsdoc/no-defaults',\n 'jsdoc/no-types',\n 'jsdoc/no-undefined-types',\n 'jsdoc/valid-types',\n];\n\nconst createLogicalTypescriptRuleset = createStandaloneRulesetFactory(logicalRules);\n\nconst createLogicalTypescriptFlavorRuleset = createStandaloneRulesetFactory(logicalRules);\n\nconst requirementsRules = [\n 'jsdoc/require-example',\n 'jsdoc/require-jsdoc',\n 'jsdoc/require-next-type',\n 'jsdoc/require-param',\n 'jsdoc/require-param-description',\n 'jsdoc/require-param-name',\n 'jsdoc/require-property',\n 'jsdoc/require-property-description',\n 'jsdoc/require-property-name',\n 'jsdoc/require-returns',\n 'jsdoc/require-returns-description',\n 'jsdoc/require-throws-type',\n 'jsdoc/require-yields',\n 'jsdoc/require-yields-type',\n];\n\nconst createRequirementsTypeScriptRuleset = createStandaloneRulesetFactory(requirementsRules);\n\nconst createRequirementsTypeScriptFlavorRuleset = createStandaloneRulesetFactory([\n ...requirementsRules,\n 'jsdoc/require-param-type',\n 'jsdoc/require-property-type',\n 'jsdoc/require-returns-type',\n 'jsdoc/require-template',\n]);\n\nconst stylisticRules = [\n 'jsdoc/check-alignment',\n 'jsdoc/check-line-alignment',\n 'jsdoc/lines-before-block',\n 'jsdoc/multiline-blocks',\n 'jsdoc/no-multi-asterisks',\n 'jsdoc/require-asterisk-prefix',\n [\n 'jsdoc/require-hyphen-before-param-description', 'never',\n ],\n 'jsdoc/tag-lines',\n];\n\nconst createStylisticTypeScriptRuleset = createStandaloneRulesetFactory(stylisticRules);\n\nconst createStylisticTypeScriptFlavorRuleset = createStandaloneRulesetFactory(stylisticRules);\n\n/* c8 ignore next 3 -- TS */\nif (!index.configs) {\n throw new Error('TypeScript guard');\n}\n\nindex.configs.recommended = createRecommendedRuleset('warn');\nindex.configs['recommended-error'] = createRecommendedRuleset('error');\nindex.configs['recommended-typescript'] = createRecommendedTypeScriptRuleset('warn');\nindex.configs['recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error');\nindex.configs['recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn');\nindex.configs['recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error');\n\nindex.configs['flat/recommended'] = createRecommendedRuleset('warn', 'flat/recommended');\nindex.configs['flat/recommended-error'] = createRecommendedRuleset('error', 'flat/recommended-error');\nindex.configs['flat/recommended-typescript'] = createRecommendedTypeScriptRuleset('warn', 'flat/recommended-typescript');\nindex.configs['flat/recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error', 'flat/recommended-typescript-error');\nindex.configs['flat/recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn', 'flat/recommended-typescript-flavor');\nindex.configs['flat/recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error', 'flat/recommended-typescript-flavor-error');\n\nindex.configs['flat/contents-typescript'] = createContentsTypescriptRuleset('warn', 'flat/contents-typescript');\nindex.configs['flat/contents-typescript-error'] = createContentsTypescriptRuleset('error', 'flat/contents-typescript-error');\nindex.configs['flat/contents-typescript-flavor'] = createContentsTypescriptFlavorRuleset('warn', 'flat/contents-typescript-flavor');\nindex.configs['flat/contents-typescript-flavor-error'] = createContentsTypescriptFlavorRuleset('error', 'flat/contents-typescript-error-flavor');\nindex.configs['flat/logical-typescript'] = createLogicalTypescriptRuleset('warn', 'flat/logical-typescript');\nindex.configs['flat/logical-typescript-error'] = createLogicalTypescriptRuleset('error', 'flat/logical-typescript-error');\nindex.configs['flat/logical-typescript-flavor'] = createLogicalTypescriptFlavorRuleset('warn', 'flat/logical-typescript-flavor');\nindex.configs['flat/logical-typescript-flavor-error'] = createLogicalTypescriptFlavorRuleset('error', 'flat/logical-typescript-error-flavor');\nindex.configs['flat/requirements-typescript'] = createRequirementsTypeScriptRuleset('warn', 'flat/requirements-typescript');\nindex.configs['flat/requirements-typescript-error'] = createRequirementsTypeScriptRuleset('error', 'flat/requirements-typescript-error');\nindex.configs['flat/requirements-typescript-flavor'] = createRequirementsTypeScriptFlavorRuleset('warn', 'flat/requirements-typescript-flavor');\nindex.configs['flat/requirements-typescript-flavor-error'] = createRequirementsTypeScriptFlavorRuleset('error', 'flat/requirements-typescript-error-flavor');\nindex.configs['flat/stylistic-typescript'] = createStylisticTypeScriptRuleset('warn', 'flat/stylistic-typescript');\nindex.configs['flat/stylistic-typescript-error'] = createStylisticTypeScriptRuleset('error', 'flat/stylistic-typescript-error');\nindex.configs['flat/stylistic-typescript-flavor'] = createStylisticTypeScriptFlavorRuleset('warn', 'flat/stylistic-typescript-flavor');\nindex.configs['flat/stylistic-typescript-flavor-error'] = createStylisticTypeScriptFlavorRuleset('error', 'flat/stylistic-typescript-error-flavor');\n\nindex.configs.examples = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n files: [\n '**/*.js',\n ],\n name: 'jsdoc/examples/processor',\n plugins: {\n examples: getJsdocProcessorPlugin(),\n },\n processor: 'examples/examples',\n },\n {\n files: [\n '**/*.md/*.js',\n ],\n name: 'jsdoc/examples/rules',\n rules: {\n // \"always\" newline rule at end unlikely in sample code\n '@stylistic/eol-last': 0,\n // Often wish to start `@example` code after newline; also may use\n // empty lines for spacing\n '@stylistic/no-multiple-empty-lines': 0,\n\n // Can generally look nicer to pad a little even if code imposes more stringency\n '@stylistic/padded-blocks': 0,\n\n '@typescript-eslint/no-unused-vars': 0,\n\n // \"always\" newline rule at end unlikely in sample code\n 'eol-last': 0,\n\n // Wouldn't generally expect example paths to resolve relative to JS file\n 'import/no-unresolved': 0,\n\n // Snippets likely too short to always include import/export info\n 'import/unambiguous': 0,\n\n 'jsdoc/require-file-overview': 0,\n\n // The end of a multiline comment would end the comment the example is in.\n 'jsdoc/require-jsdoc': 0,\n\n // See import/no-unresolved\n 'n/no-missing-import': 0,\n\n 'n/no-missing-require': 0,\n\n // Unlikely to have inadvertent debugging within examples\n 'no-console': 0,\n\n // Often wish to start `@example` code after newline; also may use\n // empty lines for spacing\n 'no-multiple-empty-lines': 0,\n\n // Many variables in examples will be `undefined`\n 'no-undef': 0,\n // Common to define variables for clarity without always using them\n 'no-unused-vars': 0,\n\n // See import/no-unresolved\n 'node/no-missing-import': 0,\n 'node/no-missing-require': 0,\n\n // Can generally look nicer to pad a little even if code imposes more stringency\n 'padded-blocks': 0,\n },\n },\n]);\n\nindex.configs['default-expressions'] = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n files: [\n '**/*.js',\n ],\n name: 'jsdoc/default-expressions/processor',\n plugins: {\n examples: getJsdocProcessorPlugin({\n checkDefaults: true,\n checkParams: true,\n checkProperties: true,\n }),\n },\n processor: 'examples/examples',\n },\n {\n files: [\n '**/*.jsdoc-defaults', '**/*.jsdoc-params', '**/*.jsdoc-properties',\n ],\n name: 'jsdoc/default-expressions/rules',\n rules: {\n ...index.configs.examples[1].rules,\n '@stylistic/quotes': [\n 'error', 'double',\n ],\n '@stylistic/semi': [\n 'error', 'never',\n ],\n '@typescript-eslint/no-unused-expressions': 0,\n 'chai-friendly/no-unused-expressions': 0,\n 'no-empty-function': 0,\n 'no-new': 0,\n 'no-unused-expressions': 0,\n quotes: [\n 'error', 'double',\n ],\n semi: [\n 'error', 'never',\n ],\n strict: 0,\n },\n },\n]);\n\nindex.configs['examples-and-default-expressions'] = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n name: 'jsdoc/examples-and-default-expressions',\n plugins: {\n examples: getJsdocProcessorPlugin({\n checkDefaults: true,\n checkParams: true,\n checkProperties: true,\n }),\n },\n },\n ...index.configs.examples.map((config) => {\n return {\n ...config,\n plugins: {},\n };\n }),\n ...index.configs['default-expressions'].map((config) => {\n return {\n ...config,\n plugins: {},\n };\n }),\n]);\n\nexport default index;\n"],"mappings":";;;;;;AAAA,IAAAA,0BAAA,GAAAC,OAAA;AAGA,IAAAC,wBAAA,GAAAD,OAAA;AAGA,IAAAE,YAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,eAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,cAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,iBAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,mBAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,gBAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,mBAAA,GAAAN,sBAAA,CAAAH,OAAA;AACA,IAAAU,YAAA,GAAAP,sBAAA,CAAAH,OAAA;AACA,IAAAW,cAAA,GAAAR,sBAAA,CAAAH,OAAA;AACA,IAAAY,mBAAA,GAAAT,sBAAA,CAAAH,OAAA;AACA,IAAAa,WAAA,GAAAV,sBAAA,CAAAH,OAAA;AACA,IAAAc,YAAA,GAAAX,sBAAA,CAAAH,OAAA;AACA,IAAAe,uBAAA,GAAAZ,sBAAA,CAAAH,OAAA;AACA,IAAAgB,UAAA,GAAAb,sBAAA,CAAAH,OAAA;AACA,IAAAiB,oBAAA,GAAAd,sBAAA,CAAAH,OAAA;AACA,IAAAkB,sBAAA,GAAAf,sBAAA,CAAAH,OAAA;AACA,IAAAmB,gBAAA,GAAAhB,sBAAA,CAAAH,OAAA;AACA,IAAAoB,iBAAA,GAAAj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,qCAAqC,EAAE,CAAC;IACxC,mBAAmB,EAAE,CAAC;IACtB,QAAQ,EAAE,CAAC;IACX,uBAAuB,EAAE,CAAC;IAC1ByG,MAAM,EAAE,CACN,OAAO,EAAE,QAAQ,CAClB;IACDC,IAAI,EAAE,CACJ,OAAO,EAAE,OAAO,CACjB;IACDC,MAAM,EAAE;EACV;AACF,CAAC,CACD;AAEF7G,KAAK,CAACC,OAAO,CAAC,kCAAkC,CAAC,GAAG,+CAAiD,CACnG;EACEsE,IAAI,EAAE,wCAAwC;EAC9CC,OAAO,EAAE;IACP4B,QAAQ,EAAE,IAAAE,gDAAuB,EAAC;MAChCE,aAAa,EAAE,IAAI;MACnBC,WAAW,EAAE,IAAI;MACjBC,eAAe,EAAE;IACnB,CAAC;EACH;AACF,CAAC,EACD,GAAG1G,KAAK,CAACC,OAAO,CAACmG,QAAQ,CAAClB,GAAG,CAAE4B,MAAM,IAAK;EACxC,OAAO;IACL,GAAGA,MAAM;IACTtC,OAAO,EAAE,CAAC;EACZ,CAAC;AACH,CAAC,CAAC,EACF,GAAGxE,KAAK,CAACC,OAAO,CAAC,qBAAqB,CAAC,CAACiF,GAAG,CAAE4B,MAAM,IAAK;EACtD,OAAO;IACL,GAAGA,MAAM;IACTtC,OAAO,EAAE,CAAC;EACZ,CAAC;AACH,CAAC,CAAC,CACF;AAAC,IAAAuC,QAAA,GAAAC,OAAA,CAAAjH,OAAA,GAEYC,KAAK;AAAAiH,MAAA,CAAAD,OAAA,GAAAA,OAAA,CAAAjH,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"index-cjs.cjs","names":["_buildForbidRuleDefinition","require","_getJsdocProcessorPlugin","_checkAccess","_interopRequireDefault","_checkAlignment","_checkExamples","_checkIndentation","_checkLineAlignment","_checkParamNames","_checkPropertyNames","_checkSyntax","_checkTagNames","_checkTemplateNames","_checkTypes","_checkValues","_convertToJsdocComments","_emptyTags","_implementsOnClasses","_importsAsDependencies","_informativeDocs","_linesBeforeBlock","_matchDescription","_matchName","_multilineBlocks","_noBadBlocks","_noBlankBlockDescriptions","_noBlankBlocks","_noDefaults","_noMissingSyntax","_noMultiAsterisks","_noRestrictedSyntax","_noTypes","_noUndefinedTypes","_requireAsteriskPrefix","_requireDescription","_requireDescriptionCompleteSentence","_requireExample","_requireFileOverview","_requireHyphenBeforeParamDescription","_requireJsdoc","_requireParam","_requireParamDescription","_requireParamName","_requireParamType","_requireProperty","_requirePropertyDescription","_requirePropertyName","_requirePropertyType","_requireReturns","_requireReturnsCheck","_requireReturnsDescription","_requireReturnsType","_requireTemplate","_requireThrows","_requireYields","_requireYieldsCheck","_sortTags","_tagLines","_textEscaping","_typeFormatting","_validTypes","e","__esModule","default","index","configs","rules","checkAccess","checkAlignment","checkExamples","checkIndentation","checkLineAlignment","checkParamNames","checkPropertyNames","checkSyntax","checkTagNames","checkTemplateNames","checkTypes","checkValues","convertToJsdocComments","emptyTags","implementsOnClasses","importsAsDependencies","informativeDocs","linesBeforeBlock","matchDescription","matchName","multilineBlocks","noBadBlocks","noBlankBlockDescriptions","noBlankBlocks","noDefaults","noMissingSyntax","noMultiAsterisks","noRestrictedSyntax","noTypes","noUndefinedTypes","requireAsteriskPrefix","requireDescription","requireDescriptionCompleteSentence","requireExample","requireFileOverview","requireHyphenBeforeParamDescription","requireJsdoc","buildForbidRuleDefinition","contexts","comment","context","message","description","url","requireParam","requireParamDescription","requireParamName","requireParamType","requireProperty","requirePropertyDescription","requirePropertyName","requirePropertyType","requireReturns","requireReturnsCheck","requireReturnsDescription","requireReturnsType","requireTemplate","requireThrows","requireYields","requireYieldsCheck","sortTags","tagLines","textEscaping","typeFormatting","validTypes","createRecommendedRuleset","warnOrError","flatName","name","plugins","jsdoc","createRecommendedTypeScriptRuleset","ruleset","typed","createRecommendedTypeScriptFlavorRuleset","createStandaloneRulesetFactory","ruleNames","Object","fromEntries","map","ruleName","slice","contentsRules","escapeHTML","createContentsTypescriptRuleset","createContentsTypescriptFlavorRuleset","logicalRules","createLogicalTypescriptRuleset","createLogicalTypescriptFlavorRuleset","requirementsRules","createRequirementsTypeScriptRuleset","createRequirementsTypeScriptFlavorRuleset","stylisticRules","createStylisticTypeScriptRuleset","createStylisticTypeScriptFlavorRuleset","Error","recommended","examples","files","getJsdocProcessorPlugin","processor","checkDefaults","checkParams","checkProperties","quotes","semi","strict","config","_default","exports","module"],"sources":["../src/index-cjs.js"],"sourcesContent":["import {\n buildForbidRuleDefinition,\n} from './buildForbidRuleDefinition.js';\nimport {\n getJsdocProcessorPlugin,\n} from './getJsdocProcessorPlugin.js';\nimport checkAccess from './rules/checkAccess.js';\nimport checkAlignment from './rules/checkAlignment.js';\nimport checkExamples from './rules/checkExamples.js';\nimport checkIndentation from './rules/checkIndentation.js';\nimport checkLineAlignment from './rules/checkLineAlignment.js';\nimport checkParamNames from './rules/checkParamNames.js';\nimport checkPropertyNames from './rules/checkPropertyNames.js';\nimport checkSyntax from './rules/checkSyntax.js';\nimport checkTagNames from './rules/checkTagNames.js';\nimport checkTemplateNames from './rules/checkTemplateNames.js';\nimport checkTypes from './rules/checkTypes.js';\nimport checkValues from './rules/checkValues.js';\nimport convertToJsdocComments from './rules/convertToJsdocComments.js';\nimport emptyTags from './rules/emptyTags.js';\nimport implementsOnClasses from './rules/implementsOnClasses.js';\nimport importsAsDependencies from './rules/importsAsDependencies.js';\nimport informativeDocs from './rules/informativeDocs.js';\nimport linesBeforeBlock from './rules/linesBeforeBlock.js';\nimport matchDescription from './rules/matchDescription.js';\nimport matchName from './rules/matchName.js';\nimport multilineBlocks from './rules/multilineBlocks.js';\nimport noBadBlocks from './rules/noBadBlocks.js';\nimport noBlankBlockDescriptions from './rules/noBlankBlockDescriptions.js';\nimport noBlankBlocks from './rules/noBlankBlocks.js';\nimport noDefaults from './rules/noDefaults.js';\nimport noMissingSyntax from './rules/noMissingSyntax.js';\nimport noMultiAsterisks from './rules/noMultiAsterisks.js';\nimport noRestrictedSyntax from './rules/noRestrictedSyntax.js';\nimport noTypes from './rules/noTypes.js';\nimport noUndefinedTypes from './rules/noUndefinedTypes.js';\nimport requireAsteriskPrefix from './rules/requireAsteriskPrefix.js';\nimport requireDescription from './rules/requireDescription.js';\nimport requireDescriptionCompleteSentence from './rules/requireDescriptionCompleteSentence.js';\nimport requireExample from './rules/requireExample.js';\nimport requireFileOverview from './rules/requireFileOverview.js';\nimport requireHyphenBeforeParamDescription from './rules/requireHyphenBeforeParamDescription.js';\nimport requireJsdoc from './rules/requireJsdoc.js';\nimport requireParam from './rules/requireParam.js';\nimport requireParamDescription from './rules/requireParamDescription.js';\nimport requireParamName from './rules/requireParamName.js';\nimport requireParamType from './rules/requireParamType.js';\nimport requireProperty from './rules/requireProperty.js';\nimport requirePropertyDescription from './rules/requirePropertyDescription.js';\nimport requirePropertyName from './rules/requirePropertyName.js';\nimport requirePropertyType from './rules/requirePropertyType.js';\nimport requireReturns from './rules/requireReturns.js';\nimport requireReturnsCheck from './rules/requireReturnsCheck.js';\nimport requireReturnsDescription from './rules/requireReturnsDescription.js';\nimport requireReturnsType from './rules/requireReturnsType.js';\nimport requireTemplate from './rules/requireTemplate.js';\nimport requireThrows from './rules/requireThrows.js';\nimport requireYields from './rules/requireYields.js';\nimport requireYieldsCheck from './rules/requireYieldsCheck.js';\nimport sortTags from './rules/sortTags.js';\nimport tagLines from './rules/tagLines.js';\nimport textEscaping from './rules/textEscaping.js';\nimport typeFormatting from './rules/typeFormatting.js';\nimport validTypes from './rules/validTypes.js';\n\n/* eslint-disable jsdoc/valid-types -- Bug */\n/**\n * @typedef {\"recommended\" | \"stylistic\" | \"contents\" | \"logical\" | \"requirements\"} ConfigGroups\n * @typedef {\"\" | \"-typescript\" | \"-typescript-flavor\"} ConfigVariants\n * @typedef {\"\" | \"-error\"} ErrorLevelVariants\n * @type {import('eslint').ESLint.Plugin & {\n * configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,\n * import('eslint').Linter.Config> & Record<\"examples\"|\"default-expressions\"|\"examples-and-default-expressions\", import('eslint').Linter.Config[]>\n * }}\n */\nconst index = {};\n/* eslint-enable jsdoc/valid-types -- Bug */\nindex.configs = {};\nindex.rules = {\n 'check-access': checkAccess,\n 'check-alignment': checkAlignment,\n 'check-examples': checkExamples,\n 'check-indentation': checkIndentation,\n 'check-line-alignment': checkLineAlignment,\n 'check-param-names': checkParamNames,\n 'check-property-names': checkPropertyNames,\n 'check-syntax': checkSyntax,\n 'check-tag-names': checkTagNames,\n 'check-template-names': checkTemplateNames,\n 'check-types': checkTypes,\n 'check-values': checkValues,\n 'convert-to-jsdoc-comments': convertToJsdocComments,\n 'empty-tags': emptyTags,\n 'implements-on-classes': implementsOnClasses,\n 'imports-as-dependencies': importsAsDependencies,\n 'informative-docs': informativeDocs,\n 'lines-before-block': linesBeforeBlock,\n 'match-description': matchDescription,\n 'match-name': matchName,\n 'multiline-blocks': multilineBlocks,\n 'no-bad-blocks': noBadBlocks,\n 'no-blank-block-descriptions': noBlankBlockDescriptions,\n 'no-blank-blocks': noBlankBlocks,\n 'no-defaults': noDefaults,\n 'no-missing-syntax': noMissingSyntax,\n 'no-multi-asterisks': noMultiAsterisks,\n 'no-restricted-syntax': noRestrictedSyntax,\n 'no-types': noTypes,\n 'no-undefined-types': noUndefinedTypes,\n 'require-asterisk-prefix': requireAsteriskPrefix,\n 'require-description': requireDescription,\n 'require-description-complete-sentence': requireDescriptionCompleteSentence,\n 'require-example': requireExample,\n 'require-file-overview': requireFileOverview,\n 'require-hyphen-before-param-description': requireHyphenBeforeParamDescription,\n 'require-jsdoc': requireJsdoc,\n 'require-next-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=next]:not([parsedType.type]))',\n context: 'any',\n message: '@next should have a type',\n },\n ],\n description: 'Requires a type for @next tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-type.md#repos-sticky-header',\n }),\n 'require-param': requireParam,\n 'require-param-description': requireParamDescription,\n 'require-param-name': requireParamName,\n 'require-param-type': requireParamType,\n 'require-property': requireProperty,\n 'require-property-description': requirePropertyDescription,\n 'require-property-name': requirePropertyName,\n 'require-property-type': requirePropertyType,\n 'require-returns': requireReturns,\n 'require-returns-check': requireReturnsCheck,\n 'require-returns-description': requireReturnsDescription,\n 'require-returns-type': requireReturnsType,\n 'require-template': requireTemplate,\n 'require-throws': requireThrows,\n 'require-throws-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=throws]:not([parsedType.type]))',\n context: 'any',\n message: '@throws should have a type',\n },\n ],\n description: 'Requires a type for @throws tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-type.md#repos-sticky-header',\n }),\n 'require-yields': requireYields,\n 'require-yields-check': requireYieldsCheck,\n 'require-yields-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=yields]:not([parsedType.type]))',\n context: 'any',\n message: '@yields should have a type',\n },\n ],\n description: 'Requires a type for @yields tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-type.md#repos-sticky-header',\n }),\n 'sort-tags': sortTags,\n 'tag-lines': tagLines,\n 'text-escaping': textEscaping,\n 'type-formatting': typeFormatting,\n 'valid-types': validTypes,\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedRuleset = (warnOrError, flatName) => {\n return {\n ...(flatName ? {\n name: 'jsdoc/' + flatName,\n } : {}),\n // @ts-expect-error ESLint 8 plugins\n plugins:\n flatName ? {\n jsdoc: index,\n } : [\n 'jsdoc',\n ],\n rules: {\n 'jsdoc/check-access': warnOrError,\n 'jsdoc/check-alignment': warnOrError,\n 'jsdoc/check-examples': 'off',\n 'jsdoc/check-indentation': 'off',\n 'jsdoc/check-line-alignment': 'off',\n 'jsdoc/check-param-names': warnOrError,\n 'jsdoc/check-property-names': warnOrError,\n 'jsdoc/check-syntax': 'off',\n 'jsdoc/check-tag-names': warnOrError,\n 'jsdoc/check-template-names': 'off',\n 'jsdoc/check-types': warnOrError,\n 'jsdoc/check-values': warnOrError,\n 'jsdoc/convert-to-jsdoc-comments': 'off',\n 'jsdoc/empty-tags': warnOrError,\n 'jsdoc/implements-on-classes': warnOrError,\n 'jsdoc/imports-as-dependencies': 'off',\n 'jsdoc/informative-docs': 'off',\n 'jsdoc/lines-before-block': 'off',\n 'jsdoc/match-description': 'off',\n 'jsdoc/match-name': 'off',\n 'jsdoc/multiline-blocks': warnOrError,\n 'jsdoc/no-bad-blocks': 'off',\n 'jsdoc/no-blank-block-descriptions': 'off',\n 'jsdoc/no-blank-blocks': 'off',\n 'jsdoc/no-defaults': warnOrError,\n 'jsdoc/no-missing-syntax': 'off',\n 'jsdoc/no-multi-asterisks': warnOrError,\n 'jsdoc/no-restricted-syntax': 'off',\n 'jsdoc/no-types': 'off',\n 'jsdoc/no-undefined-types': warnOrError,\n 'jsdoc/require-asterisk-prefix': 'off',\n 'jsdoc/require-description': 'off',\n 'jsdoc/require-description-complete-sentence': 'off',\n 'jsdoc/require-example': 'off',\n 'jsdoc/require-file-overview': 'off',\n 'jsdoc/require-hyphen-before-param-description': 'off',\n 'jsdoc/require-jsdoc': warnOrError,\n 'jsdoc/require-next-type': warnOrError,\n 'jsdoc/require-param': warnOrError,\n 'jsdoc/require-param-description': warnOrError,\n 'jsdoc/require-param-name': warnOrError,\n 'jsdoc/require-param-type': warnOrError,\n 'jsdoc/require-property': warnOrError,\n 'jsdoc/require-property-description': warnOrError,\n 'jsdoc/require-property-name': warnOrError,\n 'jsdoc/require-property-type': warnOrError,\n 'jsdoc/require-returns': warnOrError,\n 'jsdoc/require-returns-check': warnOrError,\n 'jsdoc/require-returns-description': warnOrError,\n 'jsdoc/require-returns-type': warnOrError,\n 'jsdoc/require-template': 'off',\n 'jsdoc/require-throws': 'off',\n 'jsdoc/require-throws-type': warnOrError,\n 'jsdoc/require-yields': warnOrError,\n 'jsdoc/require-yields-check': warnOrError,\n 'jsdoc/require-yields-type': warnOrError,\n 'jsdoc/sort-tags': 'off',\n 'jsdoc/tag-lines': warnOrError,\n 'jsdoc/text-escaping': 'off',\n 'jsdoc/type-formatting': 'off',\n 'jsdoc/valid-types': warnOrError,\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedTypeScriptRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedRuleset(warnOrError, flatName);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable @stylistic/indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/check-tag-names': [\n warnOrError, {\n typed: true,\n },\n ],\n 'jsdoc/no-types': warnOrError,\n 'jsdoc/no-undefined-types': 'off',\n 'jsdoc/require-param-type': 'off',\n 'jsdoc/require-property-type': 'off',\n 'jsdoc/require-returns-type': 'off',\n /* eslint-enable @stylistic/indent */\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedTypeScriptFlavorRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedRuleset(warnOrError, flatName);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable @stylistic/indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/no-undefined-types': 'off',\n /* eslint-enable @stylistic/indent */\n },\n };\n};\n\n/**\n * @param {(string | unknown[])[]} ruleNames\n */\nconst createStandaloneRulesetFactory = (ruleNames) => {\n /**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\n return (warnOrError, flatName) => {\n return {\n name: 'jsdoc/' + flatName,\n plugins: {\n jsdoc: index,\n },\n rules: Object.fromEntries(\n ruleNames.map(\n (ruleName) => {\n return (typeof ruleName === 'string' ?\n [\n ruleName, warnOrError,\n ] :\n [\n ruleName[0], [\n warnOrError, ...ruleName.slice(1),\n ],\n ]);\n },\n ),\n ),\n };\n };\n};\n\nconst contentsRules = [\n 'jsdoc/informative-docs',\n 'jsdoc/match-description',\n 'jsdoc/no-blank-block-descriptions',\n 'jsdoc/no-blank-blocks',\n [\n 'jsdoc/text-escaping', {\n escapeHTML: true,\n },\n ],\n];\n\nconst createContentsTypescriptRuleset = createStandaloneRulesetFactory(contentsRules);\n\nconst createContentsTypescriptFlavorRuleset = createStandaloneRulesetFactory(contentsRules);\n\nconst logicalRules = [\n 'jsdoc/check-access',\n 'jsdoc/check-param-names',\n 'jsdoc/check-property-names',\n 'jsdoc/check-syntax',\n 'jsdoc/check-tag-names',\n 'jsdoc/check-template-names',\n 'jsdoc/check-types',\n 'jsdoc/check-values',\n 'jsdoc/empty-tags',\n 'jsdoc/implements-on-classes',\n 'jsdoc/require-returns-check',\n 'jsdoc/require-yields-check',\n 'jsdoc/no-bad-blocks',\n 'jsdoc/no-defaults',\n 'jsdoc/no-types',\n 'jsdoc/no-undefined-types',\n 'jsdoc/valid-types',\n];\n\nconst createLogicalTypescriptRuleset = createStandaloneRulesetFactory(logicalRules);\n\nconst createLogicalTypescriptFlavorRuleset = createStandaloneRulesetFactory(logicalRules);\n\nconst requirementsRules = [\n 'jsdoc/require-example',\n 'jsdoc/require-jsdoc',\n 'jsdoc/require-next-type',\n 'jsdoc/require-param',\n 'jsdoc/require-param-description',\n 'jsdoc/require-param-name',\n 'jsdoc/require-property',\n 'jsdoc/require-property-description',\n 'jsdoc/require-property-name',\n 'jsdoc/require-returns',\n 'jsdoc/require-returns-description',\n 'jsdoc/require-throws-type',\n 'jsdoc/require-yields',\n 'jsdoc/require-yields-type',\n];\n\nconst createRequirementsTypeScriptRuleset = createStandaloneRulesetFactory(requirementsRules);\n\nconst createRequirementsTypeScriptFlavorRuleset = createStandaloneRulesetFactory([\n ...requirementsRules,\n 'jsdoc/require-param-type',\n 'jsdoc/require-property-type',\n 'jsdoc/require-returns-type',\n 'jsdoc/require-template',\n]);\n\nconst stylisticRules = [\n 'jsdoc/check-alignment',\n 'jsdoc/check-line-alignment',\n 'jsdoc/lines-before-block',\n 'jsdoc/multiline-blocks',\n 'jsdoc/no-multi-asterisks',\n 'jsdoc/require-asterisk-prefix',\n [\n 'jsdoc/require-hyphen-before-param-description', 'never',\n ],\n 'jsdoc/tag-lines',\n];\n\nconst createStylisticTypeScriptRuleset = createStandaloneRulesetFactory(stylisticRules);\n\nconst createStylisticTypeScriptFlavorRuleset = createStandaloneRulesetFactory(stylisticRules);\n\n/* c8 ignore next 3 -- TS */\nif (!index.configs) {\n throw new Error('TypeScript guard');\n}\n\nindex.configs.recommended = createRecommendedRuleset('warn');\nindex.configs['recommended-error'] = createRecommendedRuleset('error');\nindex.configs['recommended-typescript'] = createRecommendedTypeScriptRuleset('warn');\nindex.configs['recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error');\nindex.configs['recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn');\nindex.configs['recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error');\n\nindex.configs['flat/recommended'] = createRecommendedRuleset('warn', 'flat/recommended');\nindex.configs['flat/recommended-error'] = createRecommendedRuleset('error', 'flat/recommended-error');\nindex.configs['flat/recommended-typescript'] = createRecommendedTypeScriptRuleset('warn', 'flat/recommended-typescript');\nindex.configs['flat/recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error', 'flat/recommended-typescript-error');\nindex.configs['flat/recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn', 'flat/recommended-typescript-flavor');\nindex.configs['flat/recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error', 'flat/recommended-typescript-flavor-error');\n\nindex.configs['flat/contents-typescript'] = createContentsTypescriptRuleset('warn', 'flat/contents-typescript');\nindex.configs['flat/contents-typescript-error'] = createContentsTypescriptRuleset('error', 'flat/contents-typescript-error');\nindex.configs['flat/contents-typescript-flavor'] = createContentsTypescriptFlavorRuleset('warn', 'flat/contents-typescript-flavor');\nindex.configs['flat/contents-typescript-flavor-error'] = createContentsTypescriptFlavorRuleset('error', 'flat/contents-typescript-error-flavor');\nindex.configs['flat/logical-typescript'] = createLogicalTypescriptRuleset('warn', 'flat/logical-typescript');\nindex.configs['flat/logical-typescript-error'] = createLogicalTypescriptRuleset('error', 'flat/logical-typescript-error');\nindex.configs['flat/logical-typescript-flavor'] = createLogicalTypescriptFlavorRuleset('warn', 'flat/logical-typescript-flavor');\nindex.configs['flat/logical-typescript-flavor-error'] = createLogicalTypescriptFlavorRuleset('error', 'flat/logical-typescript-error-flavor');\nindex.configs['flat/requirements-typescript'] = createRequirementsTypeScriptRuleset('warn', 'flat/requirements-typescript');\nindex.configs['flat/requirements-typescript-error'] = createRequirementsTypeScriptRuleset('error', 'flat/requirements-typescript-error');\nindex.configs['flat/requirements-typescript-flavor'] = createRequirementsTypeScriptFlavorRuleset('warn', 'flat/requirements-typescript-flavor');\nindex.configs['flat/requirements-typescript-flavor-error'] = createRequirementsTypeScriptFlavorRuleset('error', 'flat/requirements-typescript-error-flavor');\nindex.configs['flat/stylistic-typescript'] = createStylisticTypeScriptRuleset('warn', 'flat/stylistic-typescript');\nindex.configs['flat/stylistic-typescript-error'] = createStylisticTypeScriptRuleset('error', 'flat/stylistic-typescript-error');\nindex.configs['flat/stylistic-typescript-flavor'] = createStylisticTypeScriptFlavorRuleset('warn', 'flat/stylistic-typescript-flavor');\nindex.configs['flat/stylistic-typescript-flavor-error'] = createStylisticTypeScriptFlavorRuleset('error', 'flat/stylistic-typescript-error-flavor');\n\nindex.configs.examples = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n files: [\n '**/*.js',\n ],\n name: 'jsdoc/examples/processor',\n plugins: {\n examples: getJsdocProcessorPlugin(),\n },\n processor: 'examples/examples',\n },\n {\n files: [\n '**/*.md/*.js',\n ],\n name: 'jsdoc/examples/rules',\n rules: {\n // \"always\" newline rule at end unlikely in sample code\n '@stylistic/eol-last': 0,\n // Often wish to start `@example` code after newline; also may use\n // empty lines for spacing\n '@stylistic/no-multiple-empty-lines': 0,\n\n // Can generally look nicer to pad a little even if code imposes more stringency\n '@stylistic/padded-blocks': 0,\n\n '@typescript-eslint/no-unused-vars': 0,\n\n // \"always\" newline rule at end unlikely in sample code\n 'eol-last': 0,\n\n // Wouldn't generally expect example paths to resolve relative to JS file\n 'import/no-unresolved': 0,\n\n // Snippets likely too short to always include import/export info\n 'import/unambiguous': 0,\n\n 'jsdoc/require-file-overview': 0,\n\n // The end of a multiline comment would end the comment the example is in.\n 'jsdoc/require-jsdoc': 0,\n\n // See import/no-unresolved\n 'n/no-missing-import': 0,\n\n 'n/no-missing-require': 0,\n\n // Unlikely to have inadvertent debugging within examples\n 'no-console': 0,\n\n // Often wish to start `@example` code after newline; also may use\n // empty lines for spacing\n 'no-multiple-empty-lines': 0,\n\n // Many variables in examples will be `undefined`\n 'no-undef': 0,\n // Common to define variables for clarity without always using them\n 'no-unused-vars': 0,\n\n // See import/no-unresolved\n 'node/no-missing-import': 0,\n 'node/no-missing-require': 0,\n\n // Can generally look nicer to pad a little even if code imposes more stringency\n 'padded-blocks': 0,\n },\n },\n]);\n\nindex.configs['default-expressions'] = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n files: [\n '**/*.js',\n ],\n name: 'jsdoc/default-expressions/processor',\n plugins: {\n examples: getJsdocProcessorPlugin({\n checkDefaults: true,\n checkParams: true,\n checkProperties: true,\n }),\n },\n processor: 'examples/examples',\n },\n {\n files: [\n '**/*.jsdoc-defaults', '**/*.jsdoc-params', '**/*.jsdoc-properties',\n ],\n name: 'jsdoc/default-expressions/rules',\n rules: {\n ...index.configs.examples[1].rules,\n '@stylistic/quotes': [\n 'error', 'double',\n ],\n '@stylistic/semi': [\n 'error', 'never',\n ],\n '@typescript-eslint/no-unused-expressions': 0,\n 'chai-friendly/no-unused-expressions': 0,\n 'no-empty-function': 0,\n 'no-new': 0,\n 'no-unused-expressions': 0,\n quotes: [\n 'error', 'double',\n ],\n semi: [\n 'error', 'never',\n ],\n strict: 0,\n },\n },\n]);\n\nindex.configs['examples-and-default-expressions'] = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n name: 'jsdoc/examples-and-default-expressions',\n plugins: {\n examples: getJsdocProcessorPlugin({\n checkDefaults: true,\n checkParams: true,\n checkProperties: true,\n }),\n },\n },\n ...index.configs.examples.map((config) => {\n return {\n ...config,\n plugins: {},\n };\n }),\n ...index.configs['default-expressions'].map((config) => {\n return {\n ...config,\n plugins: {},\n };\n }),\n]);\n\nexport default index;\n"],"mappings":";;;;;;AAAA,IAAAA,0BAAA,GAAAC,OAAA;AAGA,IAAAC,wBAAA,GAAAD,OAAA;AAGA,IAAAE,YAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,eAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,cAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,iBAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,mBAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,gBAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,mBAAA,GAAAN,sBAAA,CAAAH,OAAA;AACA,IAAAU,YAAA,GAAAP,sBAAA,CAAAH,OAAA;AACA,IAAAW,cAAA,GAAAR,sBAAA,CAAAH,OAAA;AACA,IAAAY,mBAAA,GAAAT,sBAAA,CAAAH,OAAA;AACA,IAAAa,WAAA,GAAAV,sBAAA,CAAAH,OAAA;AACA,IAAAc,YAAA,GAAAX,sBAAA,CAAAH,OAAA;AACA,IAAAe,uBAAA,GAAAZ,sBAAA,CAAAH,OAAA;AACA,IAAAgB,UAAA,GAAAb,sBAAA,CAAAH,OAAA;AACA,IAAAiB,oBAAA,GAAAd,sBAAA,CAAAH,OAAA;AACA,IAAAkB,sBAAA,GAAAf,sBAAA,CAA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AClB;IACD,iBAAiB,EAAE,CACjB,OAAO,EAAE,OAAO,CACjB;IACD,0CAA0C,EAAE,CAAC;IAC7C,qCAAqC,EAAE,CAAC;IACxC,mBAAmB,EAAE,CAAC;IACtB,QAAQ,EAAE,CAAC;IACX,uBAAuB,EAAE,CAAC;IAC1ByG,MAAM,EAAE,CACN,OAAO,EAAE,QAAQ,CAClB;IACDC,IAAI,EAAE,CACJ,OAAO,EAAE,OAAO,CACjB;IACDC,MAAM,EAAE;EACV;AACF,CAAC,CACD;AAEF7G,KAAK,CAACC,OAAO,CAAC,kCAAkC,CAAC,GAAG,+CAAiD,CACnG;EACEsE,IAAI,EAAE,wCAAwC;EAC9CC,OAAO,EAAE;IACP4B,QAAQ,EAAE,IAAAE,gDAAuB,EAAC;MAChCE,aAAa,EAAE,IAAI;MACnBC,WAAW,EAAE,IAAI;MACjBC,eAAe,EAAE;IACnB,CAAC;EACH;AACF,CAAC,EACD,GAAG1G,KAAK,CAACC,OAAO,CAACmG,QAAQ,CAAClB,GAAG,CAAE4B,MAAM,IAAK;EACxC,OAAO;IACL,GAAGA,MAAM;IACTtC,OAAO,EAAE,CAAC;EACZ,CAAC;AACH,CAAC,CAAC,EACF,GAAGxE,KAAK,CAACC,OAAO,CAAC,qBAAqB,CAAC,CAACiF,GAAG,CAAE4B,MAAM,IAAK;EACtD,OAAO;IACL,GAAGA,MAAM;IACTtC,OAAO,EAAE,CAAC;EACZ,CAAC;AACH,CAAC,CAAC,CACF;AAAC,IAAAuC,QAAA,GAAAC,OAAA,CAAAjH,OAAA,GAEYC,KAAK;AAAAiH,MAAA,CAAAD,OAAA,GAAAA,OAAA,CAAAjH,OAAA","ignoreList":[]}
@@ -8,10 +8,10 @@ export type ErrorLevelVariants = "" | "-error";
8
8
  * @typedef {"" | "-error"} ErrorLevelVariants
9
9
  * @type {import('eslint').ESLint.Plugin & {
10
10
  * configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,
11
- * import('eslint').Linter.Config>|Record<"examples"|"default-expressions"|"examples-and-default-expressions", import('eslint').Linter.Config[]>
11
+ * import('eslint').Linter.Config> & Record<"examples"|"default-expressions"|"examples-and-default-expressions", import('eslint').Linter.Config[]>
12
12
  * }}
13
13
  */
14
14
  declare const index: import("eslint").ESLint.Plugin & {
15
- configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`, import("eslint").Linter.Config> | Record<"examples" | "default-expressions" | "examples-and-default-expressions", import("eslint").Linter.Config[]>;
15
+ configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`, import("eslint").Linter.Config> & Record<"examples" | "default-expressions" | "examples-and-default-expressions", import("eslint").Linter.Config[]>;
16
16
  };
17
17
  //# sourceMappingURL=index-cjs.d.ts.map
package/dist/index.cjs CHANGED
@@ -83,7 +83,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
83
83
  * @typedef {"" | "-error"} ErrorLevelVariants
84
84
  * @type {import('eslint').ESLint.Plugin & {
85
85
  * configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,
86
- * import('eslint').Linter.Config>|Record<"examples"|"default-expressions"|"examples-and-default-expressions", import('eslint').Linter.Config[]>
86
+ * import('eslint').Linter.Config> & Record<"examples"|"default-expressions"|"examples-and-default-expressions", import('eslint').Linter.Config[]>
87
87
  * }}
88
88
  */
89
89
  const index = {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["_objectDeepMerge","require","_buildForbidRuleDefinition","_getJsdocProcessorPlugin","_checkAccess","_interopRequireDefault","_checkAlignment","_checkExamples","_checkIndentation","_checkLineAlignment","_checkParamNames","_checkPropertyNames","_checkSyntax","_checkTagNames","_checkTemplateNames","_checkTypes","_checkValues","_convertToJsdocComments","_emptyTags","_implementsOnClasses","_importsAsDependencies","_informativeDocs","_linesBeforeBlock","_matchDescription","_matchName","_multilineBlocks","_noBadBlocks","_noBlankBlockDescriptions","_noBlankBlocks","_noDefaults","_noMissingSyntax","_noMultiAsterisks","_noRestrictedSyntax","_noTypes","_noUndefinedTypes","_requireAsteriskPrefix","_requireDescription","_requireDescriptionCompleteSentence","_requireExample","_requireFileOverview","_requireHyphenBeforeParamDescription","_requireJsdoc","_requireParam","_requireParamDescription","_requireParamName","_requireParamType","_requireProperty","_requirePropertyDescription","_requirePropertyName","_requirePropertyType","_requireReturns","_requireReturnsCheck","_requireReturnsDescription","_requireReturnsType","_requireTemplate","_requireThrows","_requireYields","_requireYieldsCheck","_sortTags","_tagLines","_textEscaping","_typeFormatting","_validTypes","e","__esModule","default","index","configs","rules","checkAccess","checkAlignment","checkExamples","checkIndentation","checkLineAlignment","checkParamNames","checkPropertyNames","checkSyntax","checkTagNames","checkTemplateNames","checkTypes","checkValues","convertToJsdocComments","emptyTags","implementsOnClasses","importsAsDependencies","informativeDocs","linesBeforeBlock","matchDescription","matchName","multilineBlocks","noBadBlocks","noBlankBlockDescriptions","noBlankBlocks","noDefaults","noMissingSyntax","noMultiAsterisks","noRestrictedSyntax","noTypes","noUndefinedTypes","requireAsteriskPrefix","requireDescription","requireDescriptionCompleteSentence","requireExample","requireFileOverview","requireHyphenBeforeParamDescription","requireJsdoc","buildForbidRuleDefinition","contexts","comment","context","message","description","url","requireParam","requireParamDescription","requireParamName","requireParamType","requireProperty","requirePropertyDescription","requirePropertyName","requirePropertyType","requireReturns","requireReturnsCheck","requireReturnsDescription","requireReturnsType","requireTemplate","requireThrows","requireYields","requireYieldsCheck","sortTags","tagLines","textEscaping","typeFormatting","validTypes","createRecommendedRuleset","warnOrError","flatName","name","plugins","jsdoc","createRecommendedTypeScriptRuleset","ruleset","typed","createRecommendedTypeScriptFlavorRuleset","createStandaloneRulesetFactory","ruleNames","Object","fromEntries","map","ruleName","slice","contentsRules","escapeHTML","createContentsTypescriptRuleset","createContentsTypescriptFlavorRuleset","logicalRules","createLogicalTypescriptRuleset","createLogicalTypescriptFlavorRuleset","requirementsRules","createRequirementsTypeScriptRuleset","createRequirementsTypeScriptFlavorRuleset","stylisticRules","createStylisticTypeScriptRuleset","createStylisticTypeScriptFlavorRuleset","Error","recommended","examples","files","getJsdocProcessorPlugin","processor","checkDefaults","checkParams","checkProperties","quotes","semi","strict","config","_default","exports","cfg","outputConfig","TypeError","basePath","ignores","language","languageOptions","linterOptions","extraRuleDefinitions","forbid","contextName","entries","settings","mergeSettings","merge","includes","structuredTags","next","required"],"sources":["../src/index.js"],"sourcesContent":["/* AUTO-GENERATED BY build SCRIPT */\n/* eslint-disable perfectionist/sort-imports -- For auto-generate; Do not remove */\nimport {\n merge,\n} from 'object-deep-merge';\n\nimport {\n buildForbidRuleDefinition,\n} from './buildForbidRuleDefinition.js';\nimport {\n getJsdocProcessorPlugin,\n} from './getJsdocProcessorPlugin.js';\nimport checkAccess from './rules/checkAccess.js';\nimport checkAlignment from './rules/checkAlignment.js';\nimport checkExamples from './rules/checkExamples.js';\nimport checkIndentation from './rules/checkIndentation.js';\nimport checkLineAlignment from './rules/checkLineAlignment.js';\nimport checkParamNames from './rules/checkParamNames.js';\nimport checkPropertyNames from './rules/checkPropertyNames.js';\nimport checkSyntax from './rules/checkSyntax.js';\nimport checkTagNames from './rules/checkTagNames.js';\nimport checkTemplateNames from './rules/checkTemplateNames.js';\nimport checkTypes from './rules/checkTypes.js';\nimport checkValues from './rules/checkValues.js';\nimport convertToJsdocComments from './rules/convertToJsdocComments.js';\nimport emptyTags from './rules/emptyTags.js';\nimport implementsOnClasses from './rules/implementsOnClasses.js';\nimport importsAsDependencies from './rules/importsAsDependencies.js';\nimport informativeDocs from './rules/informativeDocs.js';\nimport linesBeforeBlock from './rules/linesBeforeBlock.js';\nimport matchDescription from './rules/matchDescription.js';\nimport matchName from './rules/matchName.js';\nimport multilineBlocks from './rules/multilineBlocks.js';\nimport noBadBlocks from './rules/noBadBlocks.js';\nimport noBlankBlockDescriptions from './rules/noBlankBlockDescriptions.js';\nimport noBlankBlocks from './rules/noBlankBlocks.js';\nimport noDefaults from './rules/noDefaults.js';\nimport noMissingSyntax from './rules/noMissingSyntax.js';\nimport noMultiAsterisks from './rules/noMultiAsterisks.js';\nimport noRestrictedSyntax from './rules/noRestrictedSyntax.js';\nimport noTypes from './rules/noTypes.js';\nimport noUndefinedTypes from './rules/noUndefinedTypes.js';\nimport requireAsteriskPrefix from './rules/requireAsteriskPrefix.js';\nimport requireDescription from './rules/requireDescription.js';\nimport requireDescriptionCompleteSentence from './rules/requireDescriptionCompleteSentence.js';\nimport requireExample from './rules/requireExample.js';\nimport requireFileOverview from './rules/requireFileOverview.js';\nimport requireHyphenBeforeParamDescription from './rules/requireHyphenBeforeParamDescription.js';\nimport requireJsdoc from './rules/requireJsdoc.js';\nimport requireParam from './rules/requireParam.js';\nimport requireParamDescription from './rules/requireParamDescription.js';\nimport requireParamName from './rules/requireParamName.js';\nimport requireParamType from './rules/requireParamType.js';\nimport requireProperty from './rules/requireProperty.js';\nimport requirePropertyDescription from './rules/requirePropertyDescription.js';\nimport requirePropertyName from './rules/requirePropertyName.js';\nimport requirePropertyType from './rules/requirePropertyType.js';\nimport requireReturns from './rules/requireReturns.js';\nimport requireReturnsCheck from './rules/requireReturnsCheck.js';\nimport requireReturnsDescription from './rules/requireReturnsDescription.js';\nimport requireReturnsType from './rules/requireReturnsType.js';\nimport requireTemplate from './rules/requireTemplate.js';\nimport requireThrows from './rules/requireThrows.js';\nimport requireYields from './rules/requireYields.js';\nimport requireYieldsCheck from './rules/requireYieldsCheck.js';\nimport sortTags from './rules/sortTags.js';\nimport tagLines from './rules/tagLines.js';\nimport textEscaping from './rules/textEscaping.js';\nimport typeFormatting from './rules/typeFormatting.js';\nimport validTypes from './rules/validTypes.js';\n\n/* eslint-disable jsdoc/valid-types -- Bug */\n/**\n * @typedef {\"recommended\" | \"stylistic\" | \"contents\" | \"logical\" | \"requirements\"} ConfigGroups\n * @typedef {\"\" | \"-typescript\" | \"-typescript-flavor\"} ConfigVariants\n * @typedef {\"\" | \"-error\"} ErrorLevelVariants\n * @type {import('eslint').ESLint.Plugin & {\n * configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,\n * import('eslint').Linter.Config>|Record<\"examples\"|\"default-expressions\"|\"examples-and-default-expressions\", import('eslint').Linter.Config[]>\n * }}\n */\nconst index = {};\n/* eslint-enable jsdoc/valid-types -- Bug */\nindex.configs = {};\nindex.rules = {\n 'check-access': checkAccess,\n 'check-alignment': checkAlignment,\n 'check-examples': checkExamples,\n 'check-indentation': checkIndentation,\n 'check-line-alignment': checkLineAlignment,\n 'check-param-names': checkParamNames,\n 'check-property-names': checkPropertyNames,\n 'check-syntax': checkSyntax,\n 'check-tag-names': checkTagNames,\n 'check-template-names': checkTemplateNames,\n 'check-types': checkTypes,\n 'check-values': checkValues,\n 'convert-to-jsdoc-comments': convertToJsdocComments,\n 'empty-tags': emptyTags,\n 'implements-on-classes': implementsOnClasses,\n 'imports-as-dependencies': importsAsDependencies,\n 'informative-docs': informativeDocs,\n 'lines-before-block': linesBeforeBlock,\n 'match-description': matchDescription,\n 'match-name': matchName,\n 'multiline-blocks': multilineBlocks,\n 'no-bad-blocks': noBadBlocks,\n 'no-blank-block-descriptions': noBlankBlockDescriptions,\n 'no-blank-blocks': noBlankBlocks,\n 'no-defaults': noDefaults,\n 'no-missing-syntax': noMissingSyntax,\n 'no-multi-asterisks': noMultiAsterisks,\n 'no-restricted-syntax': noRestrictedSyntax,\n 'no-types': noTypes,\n 'no-undefined-types': noUndefinedTypes,\n 'require-asterisk-prefix': requireAsteriskPrefix,\n 'require-description': requireDescription,\n 'require-description-complete-sentence': requireDescriptionCompleteSentence,\n 'require-example': requireExample,\n 'require-file-overview': requireFileOverview,\n 'require-hyphen-before-param-description': requireHyphenBeforeParamDescription,\n 'require-jsdoc': requireJsdoc,\n 'require-next-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=next]:not([parsedType.type]))',\n context: 'any',\n message: '@next should have a type',\n },\n ],\n description: 'Requires a type for @next tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-type.md#repos-sticky-header',\n }),\n 'require-param': requireParam,\n 'require-param-description': requireParamDescription,\n 'require-param-name': requireParamName,\n 'require-param-type': requireParamType,\n 'require-property': requireProperty,\n 'require-property-description': requirePropertyDescription,\n 'require-property-name': requirePropertyName,\n 'require-property-type': requirePropertyType,\n 'require-returns': requireReturns,\n 'require-returns-check': requireReturnsCheck,\n 'require-returns-description': requireReturnsDescription,\n 'require-returns-type': requireReturnsType,\n 'require-template': requireTemplate,\n 'require-throws': requireThrows,\n 'require-throws-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=throws]:not([parsedType.type]))',\n context: 'any',\n message: '@throws should have a type',\n },\n ],\n description: 'Requires a type for @throws tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-type.md#repos-sticky-header',\n }),\n 'require-yields': requireYields,\n 'require-yields-check': requireYieldsCheck,\n 'require-yields-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=yields]:not([parsedType.type]))',\n context: 'any',\n message: '@yields should have a type',\n },\n ],\n description: 'Requires a type for @yields tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-type.md#repos-sticky-header',\n }),\n 'sort-tags': sortTags,\n 'tag-lines': tagLines,\n 'text-escaping': textEscaping,\n 'type-formatting': typeFormatting,\n 'valid-types': validTypes,\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedRuleset = (warnOrError, flatName) => {\n return {\n ...(flatName ? {\n name: 'jsdoc/' + flatName,\n } : {}),\n // @ts-expect-error ESLint 8 plugins\n plugins:\n flatName ? {\n jsdoc: index,\n } : [\n 'jsdoc',\n ],\n rules: {\n 'jsdoc/check-access': warnOrError,\n 'jsdoc/check-alignment': warnOrError,\n 'jsdoc/check-examples': 'off',\n 'jsdoc/check-indentation': 'off',\n 'jsdoc/check-line-alignment': 'off',\n 'jsdoc/check-param-names': warnOrError,\n 'jsdoc/check-property-names': warnOrError,\n 'jsdoc/check-syntax': 'off',\n 'jsdoc/check-tag-names': warnOrError,\n 'jsdoc/check-template-names': 'off',\n 'jsdoc/check-types': warnOrError,\n 'jsdoc/check-values': warnOrError,\n 'jsdoc/convert-to-jsdoc-comments': 'off',\n 'jsdoc/empty-tags': warnOrError,\n 'jsdoc/implements-on-classes': warnOrError,\n 'jsdoc/imports-as-dependencies': 'off',\n 'jsdoc/informative-docs': 'off',\n 'jsdoc/lines-before-block': 'off',\n 'jsdoc/match-description': 'off',\n 'jsdoc/match-name': 'off',\n 'jsdoc/multiline-blocks': warnOrError,\n 'jsdoc/no-bad-blocks': 'off',\n 'jsdoc/no-blank-block-descriptions': 'off',\n 'jsdoc/no-blank-blocks': 'off',\n 'jsdoc/no-defaults': warnOrError,\n 'jsdoc/no-missing-syntax': 'off',\n 'jsdoc/no-multi-asterisks': warnOrError,\n 'jsdoc/no-restricted-syntax': 'off',\n 'jsdoc/no-types': 'off',\n 'jsdoc/no-undefined-types': warnOrError,\n 'jsdoc/require-asterisk-prefix': 'off',\n 'jsdoc/require-description': 'off',\n 'jsdoc/require-description-complete-sentence': 'off',\n 'jsdoc/require-example': 'off',\n 'jsdoc/require-file-overview': 'off',\n 'jsdoc/require-hyphen-before-param-description': 'off',\n 'jsdoc/require-jsdoc': warnOrError,\n 'jsdoc/require-next-type': warnOrError,\n 'jsdoc/require-param': warnOrError,\n 'jsdoc/require-param-description': warnOrError,\n 'jsdoc/require-param-name': warnOrError,\n 'jsdoc/require-param-type': warnOrError,\n 'jsdoc/require-property': warnOrError,\n 'jsdoc/require-property-description': warnOrError,\n 'jsdoc/require-property-name': warnOrError,\n 'jsdoc/require-property-type': warnOrError,\n 'jsdoc/require-returns': warnOrError,\n 'jsdoc/require-returns-check': warnOrError,\n 'jsdoc/require-returns-description': warnOrError,\n 'jsdoc/require-returns-type': warnOrError,\n 'jsdoc/require-template': 'off',\n 'jsdoc/require-throws': 'off',\n 'jsdoc/require-throws-type': warnOrError,\n 'jsdoc/require-yields': warnOrError,\n 'jsdoc/require-yields-check': warnOrError,\n 'jsdoc/require-yields-type': warnOrError,\n 'jsdoc/sort-tags': 'off',\n 'jsdoc/tag-lines': warnOrError,\n 'jsdoc/text-escaping': 'off',\n 'jsdoc/type-formatting': 'off',\n 'jsdoc/valid-types': warnOrError,\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedTypeScriptRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedRuleset(warnOrError, flatName);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable @stylistic/indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/check-tag-names': [\n warnOrError, {\n typed: true,\n },\n ],\n 'jsdoc/no-types': warnOrError,\n 'jsdoc/no-undefined-types': 'off',\n 'jsdoc/require-param-type': 'off',\n 'jsdoc/require-property-type': 'off',\n 'jsdoc/require-returns-type': 'off',\n /* eslint-enable @stylistic/indent */\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedTypeScriptFlavorRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedRuleset(warnOrError, flatName);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable @stylistic/indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/no-undefined-types': 'off',\n /* eslint-enable @stylistic/indent */\n },\n };\n};\n\n/**\n * @param {(string | unknown[])[]} ruleNames\n */\nconst createStandaloneRulesetFactory = (ruleNames) => {\n /**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\n return (warnOrError, flatName) => {\n return {\n name: 'jsdoc/' + flatName,\n plugins: {\n jsdoc: index,\n },\n rules: Object.fromEntries(\n ruleNames.map(\n (ruleName) => {\n return (typeof ruleName === 'string' ?\n [\n ruleName, warnOrError,\n ] :\n [\n ruleName[0], [\n warnOrError, ...ruleName.slice(1),\n ],\n ]);\n },\n ),\n ),\n };\n };\n};\n\nconst contentsRules = [\n 'jsdoc/informative-docs',\n 'jsdoc/match-description',\n 'jsdoc/no-blank-block-descriptions',\n 'jsdoc/no-blank-blocks',\n [\n 'jsdoc/text-escaping', {\n escapeHTML: true,\n },\n ],\n];\n\nconst createContentsTypescriptRuleset = createStandaloneRulesetFactory(contentsRules);\n\nconst createContentsTypescriptFlavorRuleset = createStandaloneRulesetFactory(contentsRules);\n\nconst logicalRules = [\n 'jsdoc/check-access',\n 'jsdoc/check-param-names',\n 'jsdoc/check-property-names',\n 'jsdoc/check-syntax',\n 'jsdoc/check-tag-names',\n 'jsdoc/check-template-names',\n 'jsdoc/check-types',\n 'jsdoc/check-values',\n 'jsdoc/empty-tags',\n 'jsdoc/implements-on-classes',\n 'jsdoc/require-returns-check',\n 'jsdoc/require-yields-check',\n 'jsdoc/no-bad-blocks',\n 'jsdoc/no-defaults',\n 'jsdoc/no-types',\n 'jsdoc/no-undefined-types',\n 'jsdoc/valid-types',\n];\n\nconst createLogicalTypescriptRuleset = createStandaloneRulesetFactory(logicalRules);\n\nconst createLogicalTypescriptFlavorRuleset = createStandaloneRulesetFactory(logicalRules);\n\nconst requirementsRules = [\n 'jsdoc/require-example',\n 'jsdoc/require-jsdoc',\n 'jsdoc/require-next-type',\n 'jsdoc/require-param',\n 'jsdoc/require-param-description',\n 'jsdoc/require-param-name',\n 'jsdoc/require-property',\n 'jsdoc/require-property-description',\n 'jsdoc/require-property-name',\n 'jsdoc/require-returns',\n 'jsdoc/require-returns-description',\n 'jsdoc/require-throws-type',\n 'jsdoc/require-yields',\n 'jsdoc/require-yields-type',\n];\n\nconst createRequirementsTypeScriptRuleset = createStandaloneRulesetFactory(requirementsRules);\n\nconst createRequirementsTypeScriptFlavorRuleset = createStandaloneRulesetFactory([\n ...requirementsRules,\n 'jsdoc/require-param-type',\n 'jsdoc/require-property-type',\n 'jsdoc/require-returns-type',\n 'jsdoc/require-template',\n]);\n\nconst stylisticRules = [\n 'jsdoc/check-alignment',\n 'jsdoc/check-line-alignment',\n 'jsdoc/lines-before-block',\n 'jsdoc/multiline-blocks',\n 'jsdoc/no-multi-asterisks',\n 'jsdoc/require-asterisk-prefix',\n [\n 'jsdoc/require-hyphen-before-param-description', 'never',\n ],\n 'jsdoc/tag-lines',\n];\n\nconst createStylisticTypeScriptRuleset = createStandaloneRulesetFactory(stylisticRules);\n\nconst createStylisticTypeScriptFlavorRuleset = createStandaloneRulesetFactory(stylisticRules);\n\n/* c8 ignore next 3 -- TS */\nif (!index.configs) {\n throw new Error('TypeScript guard');\n}\n\nindex.configs.recommended = createRecommendedRuleset('warn');\nindex.configs['recommended-error'] = createRecommendedRuleset('error');\nindex.configs['recommended-typescript'] = createRecommendedTypeScriptRuleset('warn');\nindex.configs['recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error');\nindex.configs['recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn');\nindex.configs['recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error');\n\nindex.configs['flat/recommended'] = createRecommendedRuleset('warn', 'flat/recommended');\nindex.configs['flat/recommended-error'] = createRecommendedRuleset('error', 'flat/recommended-error');\nindex.configs['flat/recommended-typescript'] = createRecommendedTypeScriptRuleset('warn', 'flat/recommended-typescript');\nindex.configs['flat/recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error', 'flat/recommended-typescript-error');\nindex.configs['flat/recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn', 'flat/recommended-typescript-flavor');\nindex.configs['flat/recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error', 'flat/recommended-typescript-flavor-error');\n\nindex.configs['flat/contents-typescript'] = createContentsTypescriptRuleset('warn', 'flat/contents-typescript');\nindex.configs['flat/contents-typescript-error'] = createContentsTypescriptRuleset('error', 'flat/contents-typescript-error');\nindex.configs['flat/contents-typescript-flavor'] = createContentsTypescriptFlavorRuleset('warn', 'flat/contents-typescript-flavor');\nindex.configs['flat/contents-typescript-flavor-error'] = createContentsTypescriptFlavorRuleset('error', 'flat/contents-typescript-error-flavor');\nindex.configs['flat/logical-typescript'] = createLogicalTypescriptRuleset('warn', 'flat/logical-typescript');\nindex.configs['flat/logical-typescript-error'] = createLogicalTypescriptRuleset('error', 'flat/logical-typescript-error');\nindex.configs['flat/logical-typescript-flavor'] = createLogicalTypescriptFlavorRuleset('warn', 'flat/logical-typescript-flavor');\nindex.configs['flat/logical-typescript-flavor-error'] = createLogicalTypescriptFlavorRuleset('error', 'flat/logical-typescript-error-flavor');\nindex.configs['flat/requirements-typescript'] = createRequirementsTypeScriptRuleset('warn', 'flat/requirements-typescript');\nindex.configs['flat/requirements-typescript-error'] = createRequirementsTypeScriptRuleset('error', 'flat/requirements-typescript-error');\nindex.configs['flat/requirements-typescript-flavor'] = createRequirementsTypeScriptFlavorRuleset('warn', 'flat/requirements-typescript-flavor');\nindex.configs['flat/requirements-typescript-flavor-error'] = createRequirementsTypeScriptFlavorRuleset('error', 'flat/requirements-typescript-error-flavor');\nindex.configs['flat/stylistic-typescript'] = createStylisticTypeScriptRuleset('warn', 'flat/stylistic-typescript');\nindex.configs['flat/stylistic-typescript-error'] = createStylisticTypeScriptRuleset('error', 'flat/stylistic-typescript-error');\nindex.configs['flat/stylistic-typescript-flavor'] = createStylisticTypeScriptFlavorRuleset('warn', 'flat/stylistic-typescript-flavor');\nindex.configs['flat/stylistic-typescript-flavor-error'] = createStylisticTypeScriptFlavorRuleset('error', 'flat/stylistic-typescript-error-flavor');\n\nindex.configs.examples = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n files: [\n '**/*.js',\n ],\n name: 'jsdoc/examples/processor',\n plugins: {\n examples: getJsdocProcessorPlugin(),\n },\n processor: 'examples/examples',\n },\n {\n files: [\n '**/*.md/*.js',\n ],\n name: 'jsdoc/examples/rules',\n rules: {\n // \"always\" newline rule at end unlikely in sample code\n '@stylistic/eol-last': 0,\n // Often wish to start `@example` code after newline; also may use\n // empty lines for spacing\n '@stylistic/no-multiple-empty-lines': 0,\n\n // Can generally look nicer to pad a little even if code imposes more stringency\n '@stylistic/padded-blocks': 0,\n\n '@typescript-eslint/no-unused-vars': 0,\n\n // \"always\" newline rule at end unlikely in sample code\n 'eol-last': 0,\n\n // Wouldn't generally expect example paths to resolve relative to JS file\n 'import/no-unresolved': 0,\n\n // Snippets likely too short to always include import/export info\n 'import/unambiguous': 0,\n\n 'jsdoc/require-file-overview': 0,\n\n // The end of a multiline comment would end the comment the example is in.\n 'jsdoc/require-jsdoc': 0,\n\n // See import/no-unresolved\n 'n/no-missing-import': 0,\n\n 'n/no-missing-require': 0,\n\n // Unlikely to have inadvertent debugging within examples\n 'no-console': 0,\n\n // Often wish to start `@example` code after newline; also may use\n // empty lines for spacing\n 'no-multiple-empty-lines': 0,\n\n // Many variables in examples will be `undefined`\n 'no-undef': 0,\n // Common to define variables for clarity without always using them\n 'no-unused-vars': 0,\n\n // See import/no-unresolved\n 'node/no-missing-import': 0,\n 'node/no-missing-require': 0,\n\n // Can generally look nicer to pad a little even if code imposes more stringency\n 'padded-blocks': 0,\n },\n },\n]);\n\nindex.configs['default-expressions'] = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n files: [\n '**/*.js',\n ],\n name: 'jsdoc/default-expressions/processor',\n plugins: {\n examples: getJsdocProcessorPlugin({\n checkDefaults: true,\n checkParams: true,\n checkProperties: true,\n }),\n },\n processor: 'examples/examples',\n },\n {\n files: [\n '**/*.jsdoc-defaults', '**/*.jsdoc-params', '**/*.jsdoc-properties',\n ],\n name: 'jsdoc/default-expressions/rules',\n rules: {\n ...index.configs.examples[1].rules,\n '@stylistic/quotes': [\n 'error', 'double',\n ],\n '@stylistic/semi': [\n 'error', 'never',\n ],\n '@typescript-eslint/no-unused-expressions': 0,\n 'chai-friendly/no-unused-expressions': 0,\n 'no-empty-function': 0,\n 'no-new': 0,\n 'no-unused-expressions': 0,\n quotes: [\n 'error', 'double',\n ],\n semi: [\n 'error', 'never',\n ],\n strict: 0,\n },\n },\n]);\n\nindex.configs['examples-and-default-expressions'] = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n name: 'jsdoc/examples-and-default-expressions',\n plugins: {\n examples: getJsdocProcessorPlugin({\n checkDefaults: true,\n checkParams: true,\n checkProperties: true,\n }),\n },\n },\n ...index.configs.examples.map((config) => {\n return {\n ...config,\n plugins: {},\n };\n }),\n ...index.configs['default-expressions'].map((config) => {\n return {\n ...config,\n plugins: {},\n };\n }),\n]);\n\nexport default index;\n\n/* eslint-disable jsdoc/valid-types -- Bug */\n/**\n * @type {((\n * cfg?: import('eslint').Linter.Config & {\n * config?: `flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,\n * mergeSettings?: boolean,\n * settings?: Partial<import('./iterateJsdoc.js').Settings>,\n * rules?: {[key in keyof import('./rules.d.ts').Rules]?: import('eslint').Linter.RuleEntry<import('./rules.d.ts').Rules[key]>},\n * extraRuleDefinitions?: {\n * forbid: {\n * [contextName: string]: {\n * description?: string,\n * url?: string,\n * contexts: (string|{\n * message: string,\n * context: string,\n * comment: string\n * })[]\n * }\n * }\n * }\n * }\n * ) => import('eslint').Linter.Config)}\n */\nexport const jsdoc = function (cfg) {\n /* eslint-enable jsdoc/valid-types -- Bug */\n /** @type {import('eslint').Linter.Config} */\n let outputConfig = {\n plugins: {\n jsdoc: index,\n },\n };\n\n if (cfg) {\n if (cfg.config) {\n // @ts-expect-error Security check\n if (cfg.config === '__proto__') {\n throw new TypeError('Disallowed config value');\n }\n\n outputConfig = /** @type {import('eslint').Linter.Config} */ (index.configs[cfg.config]);\n }\n\n if (cfg.rules) {\n outputConfig.rules = {\n ...outputConfig.rules,\n ...cfg.rules,\n };\n }\n\n if (cfg.plugins) {\n outputConfig.plugins = {\n ...outputConfig.plugins,\n ...cfg.plugins,\n };\n }\n\n if (cfg.name) {\n outputConfig.name = cfg.name;\n }\n\n if (cfg.basePath) {\n outputConfig.basePath = cfg.basePath;\n }\n\n if (cfg.files) {\n outputConfig.files = cfg.files;\n }\n\n if (cfg.ignores) {\n outputConfig.ignores = cfg.ignores;\n }\n\n if (cfg.language) {\n outputConfig.language = cfg.language;\n }\n\n if (cfg.languageOptions) {\n outputConfig.languageOptions = cfg.languageOptions;\n }\n\n if (cfg.linterOptions) {\n outputConfig.linterOptions = cfg.linterOptions;\n }\n\n if (cfg.processor) {\n outputConfig.processor = cfg.processor;\n }\n\n if (cfg.extraRuleDefinitions) {\n if (!outputConfig.plugins?.jsdoc?.rules) {\n throw new Error('JSDoc plugin required for `extraRuleDefinitions`');\n }\n\n if (cfg.extraRuleDefinitions.forbid) {\n for (const [\n contextName,\n {\n contexts,\n description,\n url,\n },\n ] of Object.entries(cfg.extraRuleDefinitions.forbid)) {\n outputConfig.plugins.jsdoc.rules[`forbid-${contextName}`] =\n buildForbidRuleDefinition({\n contextName,\n contexts,\n description,\n url,\n });\n }\n }\n }\n }\n\n outputConfig.settings = {\n jsdoc: cfg?.mergeSettings === false ?\n cfg.settings :\n merge(\n {},\n cfg?.settings ?? {},\n cfg?.config?.includes('recommended') ?\n {\n // We may need to drop these for \"typescript\" (non-\"flavor\") configs,\n // if support is later added: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html\n structuredTags: {\n next: {\n required: [\n 'type',\n ],\n },\n },\n } :\n {},\n ),\n };\n\n return outputConfig;\n};\n\nexport {\n getJsdocProcessorPlugin,\n} from './getJsdocProcessorPlugin.js';\n"],"mappings":";;;;;;;;;;;;;AAEA,IAAAA,gBAAA,GAAAC,OAAA;AAIA,IAAAC,0BAAA,GAAAD,OAAA;AAGA,IAAAE,wBAAA,GAAAF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,CACF,IAAIkC,MAAM,CAAC4C,OAAO,CAACX,GAAG,CAACQ,oBAAoB,CAACC,MAAM,CAAC,EAAE;UACpDR,YAAY,CAAC1C,OAAO,CAACC,KAAK,CAACvE,KAAK,CAAC,UAAUyH,WAAW,EAAE,CAAC,GACvD,IAAAnF,oDAAyB,EAAC;YACxBmF,WAAW;YACXlF,QAAQ;YACRI,WAAW;YACXC;UACF,CAAC,CAAC;QACN;MACF;IACF;EACF;EAEAoE,YAAY,CAACW,QAAQ,GAAG;IACtBpD,KAAK,EAAEwC,GAAG,EAAEa,aAAa,KAAK,KAAK,GACjCb,GAAG,CAACY,QAAQ,GACZ,IAAAE,sBAAK,EACH,CAAC,CAAC,EACFd,GAAG,EAAEY,QAAQ,IAAI,CAAC,CAAC,EACnBZ,GAAG,EAAEH,MAAM,EAAEkB,QAAQ,CAAC,aAAa,CAAC,GAClC;MACE;MACA;MACAC,cAAc,EAAE;QACdC,IAAI,EAAE;UACJC,QAAQ,EAAE,CACR,MAAM;QAEV;MACF;IACF,CAAC,GACD,CAAC,CACL;EACJ,CAAC;EAED,OAAOjB,YAAY;AACrB,CAAC;AAACF,OAAA,CAAAvC,KAAA,GAAAA,KAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.cjs","names":["_objectDeepMerge","require","_buildForbidRuleDefinition","_getJsdocProcessorPlugin","_checkAccess","_interopRequireDefault","_checkAlignment","_checkExamples","_checkIndentation","_checkLineAlignment","_checkParamNames","_checkPropertyNames","_checkSyntax","_checkTagNames","_checkTemplateNames","_checkTypes","_checkValues","_convertToJsdocComments","_emptyTags","_implementsOnClasses","_importsAsDependencies","_informativeDocs","_linesBeforeBlock","_matchDescription","_matchName","_multilineBlocks","_noBadBlocks","_noBlankBlockDescriptions","_noBlankBlocks","_noDefaults","_noMissingSyntax","_noMultiAsterisks","_noRestrictedSyntax","_noTypes","_noUndefinedTypes","_requireAsteriskPrefix","_requireDescription","_requireDescriptionCompleteSentence","_requireExample","_requireFileOverview","_requireHyphenBeforeParamDescription","_requireJsdoc","_requireParam","_requireParamDescription","_requireParamName","_requireParamType","_requireProperty","_requirePropertyDescription","_requirePropertyName","_requirePropertyType","_requireReturns","_requireReturnsCheck","_requireReturnsDescription","_requireReturnsType","_requireTemplate","_requireThrows","_requireYields","_requireYieldsCheck","_sortTags","_tagLines","_textEscaping","_typeFormatting","_validTypes","e","__esModule","default","index","configs","rules","checkAccess","checkAlignment","checkExamples","checkIndentation","checkLineAlignment","checkParamNames","checkPropertyNames","checkSyntax","checkTagNames","checkTemplateNames","checkTypes","checkValues","convertToJsdocComments","emptyTags","implementsOnClasses","importsAsDependencies","informativeDocs","linesBeforeBlock","matchDescription","matchName","multilineBlocks","noBadBlocks","noBlankBlockDescriptions","noBlankBlocks","noDefaults","noMissingSyntax","noMultiAsterisks","noRestrictedSyntax","noTypes","noUndefinedTypes","requireAsteriskPrefix","requireDescription","requireDescriptionCompleteSentence","requireExample","requireFileOverview","requireHyphenBeforeParamDescription","requireJsdoc","buildForbidRuleDefinition","contexts","comment","context","message","description","url","requireParam","requireParamDescription","requireParamName","requireParamType","requireProperty","requirePropertyDescription","requirePropertyName","requirePropertyType","requireReturns","requireReturnsCheck","requireReturnsDescription","requireReturnsType","requireTemplate","requireThrows","requireYields","requireYieldsCheck","sortTags","tagLines","textEscaping","typeFormatting","validTypes","createRecommendedRuleset","warnOrError","flatName","name","plugins","jsdoc","createRecommendedTypeScriptRuleset","ruleset","typed","createRecommendedTypeScriptFlavorRuleset","createStandaloneRulesetFactory","ruleNames","Object","fromEntries","map","ruleName","slice","contentsRules","escapeHTML","createContentsTypescriptRuleset","createContentsTypescriptFlavorRuleset","logicalRules","createLogicalTypescriptRuleset","createLogicalTypescriptFlavorRuleset","requirementsRules","createRequirementsTypeScriptRuleset","createRequirementsTypeScriptFlavorRuleset","stylisticRules","createStylisticTypeScriptRuleset","createStylisticTypeScriptFlavorRuleset","Error","recommended","examples","files","getJsdocProcessorPlugin","processor","checkDefaults","checkParams","checkProperties","quotes","semi","strict","config","_default","exports","cfg","outputConfig","TypeError","basePath","ignores","language","languageOptions","linterOptions","extraRuleDefinitions","forbid","contextName","entries","settings","mergeSettings","merge","includes","structuredTags","next","required"],"sources":["../src/index.js"],"sourcesContent":["/* AUTO-GENERATED BY build SCRIPT */\n/* eslint-disable perfectionist/sort-imports -- For auto-generate; Do not remove */\nimport {\n merge,\n} from 'object-deep-merge';\n\nimport {\n buildForbidRuleDefinition,\n} from './buildForbidRuleDefinition.js';\nimport {\n getJsdocProcessorPlugin,\n} from './getJsdocProcessorPlugin.js';\nimport checkAccess from './rules/checkAccess.js';\nimport checkAlignment from './rules/checkAlignment.js';\nimport checkExamples from './rules/checkExamples.js';\nimport checkIndentation from './rules/checkIndentation.js';\nimport checkLineAlignment from './rules/checkLineAlignment.js';\nimport checkParamNames from './rules/checkParamNames.js';\nimport checkPropertyNames from './rules/checkPropertyNames.js';\nimport checkSyntax from './rules/checkSyntax.js';\nimport checkTagNames from './rules/checkTagNames.js';\nimport checkTemplateNames from './rules/checkTemplateNames.js';\nimport checkTypes from './rules/checkTypes.js';\nimport checkValues from './rules/checkValues.js';\nimport convertToJsdocComments from './rules/convertToJsdocComments.js';\nimport emptyTags from './rules/emptyTags.js';\nimport implementsOnClasses from './rules/implementsOnClasses.js';\nimport importsAsDependencies from './rules/importsAsDependencies.js';\nimport informativeDocs from './rules/informativeDocs.js';\nimport linesBeforeBlock from './rules/linesBeforeBlock.js';\nimport matchDescription from './rules/matchDescription.js';\nimport matchName from './rules/matchName.js';\nimport multilineBlocks from './rules/multilineBlocks.js';\nimport noBadBlocks from './rules/noBadBlocks.js';\nimport noBlankBlockDescriptions from './rules/noBlankBlockDescriptions.js';\nimport noBlankBlocks from './rules/noBlankBlocks.js';\nimport noDefaults from './rules/noDefaults.js';\nimport noMissingSyntax from './rules/noMissingSyntax.js';\nimport noMultiAsterisks from './rules/noMultiAsterisks.js';\nimport noRestrictedSyntax from './rules/noRestrictedSyntax.js';\nimport noTypes from './rules/noTypes.js';\nimport noUndefinedTypes from './rules/noUndefinedTypes.js';\nimport requireAsteriskPrefix from './rules/requireAsteriskPrefix.js';\nimport requireDescription from './rules/requireDescription.js';\nimport requireDescriptionCompleteSentence from './rules/requireDescriptionCompleteSentence.js';\nimport requireExample from './rules/requireExample.js';\nimport requireFileOverview from './rules/requireFileOverview.js';\nimport requireHyphenBeforeParamDescription from './rules/requireHyphenBeforeParamDescription.js';\nimport requireJsdoc from './rules/requireJsdoc.js';\nimport requireParam from './rules/requireParam.js';\nimport requireParamDescription from './rules/requireParamDescription.js';\nimport requireParamName from './rules/requireParamName.js';\nimport requireParamType from './rules/requireParamType.js';\nimport requireProperty from './rules/requireProperty.js';\nimport requirePropertyDescription from './rules/requirePropertyDescription.js';\nimport requirePropertyName from './rules/requirePropertyName.js';\nimport requirePropertyType from './rules/requirePropertyType.js';\nimport requireReturns from './rules/requireReturns.js';\nimport requireReturnsCheck from './rules/requireReturnsCheck.js';\nimport requireReturnsDescription from './rules/requireReturnsDescription.js';\nimport requireReturnsType from './rules/requireReturnsType.js';\nimport requireTemplate from './rules/requireTemplate.js';\nimport requireThrows from './rules/requireThrows.js';\nimport requireYields from './rules/requireYields.js';\nimport requireYieldsCheck from './rules/requireYieldsCheck.js';\nimport sortTags from './rules/sortTags.js';\nimport tagLines from './rules/tagLines.js';\nimport textEscaping from './rules/textEscaping.js';\nimport typeFormatting from './rules/typeFormatting.js';\nimport validTypes from './rules/validTypes.js';\n\n/* eslint-disable jsdoc/valid-types -- Bug */\n/**\n * @typedef {\"recommended\" | \"stylistic\" | \"contents\" | \"logical\" | \"requirements\"} ConfigGroups\n * @typedef {\"\" | \"-typescript\" | \"-typescript-flavor\"} ConfigVariants\n * @typedef {\"\" | \"-error\"} ErrorLevelVariants\n * @type {import('eslint').ESLint.Plugin & {\n * configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,\n * import('eslint').Linter.Config> & Record<\"examples\"|\"default-expressions\"|\"examples-and-default-expressions\", import('eslint').Linter.Config[]>\n * }}\n */\nconst index = {};\n/* eslint-enable jsdoc/valid-types -- Bug */\nindex.configs = {};\nindex.rules = {\n 'check-access': checkAccess,\n 'check-alignment': checkAlignment,\n 'check-examples': checkExamples,\n 'check-indentation': checkIndentation,\n 'check-line-alignment': checkLineAlignment,\n 'check-param-names': checkParamNames,\n 'check-property-names': checkPropertyNames,\n 'check-syntax': checkSyntax,\n 'check-tag-names': checkTagNames,\n 'check-template-names': checkTemplateNames,\n 'check-types': checkTypes,\n 'check-values': checkValues,\n 'convert-to-jsdoc-comments': convertToJsdocComments,\n 'empty-tags': emptyTags,\n 'implements-on-classes': implementsOnClasses,\n 'imports-as-dependencies': importsAsDependencies,\n 'informative-docs': informativeDocs,\n 'lines-before-block': linesBeforeBlock,\n 'match-description': matchDescription,\n 'match-name': matchName,\n 'multiline-blocks': multilineBlocks,\n 'no-bad-blocks': noBadBlocks,\n 'no-blank-block-descriptions': noBlankBlockDescriptions,\n 'no-blank-blocks': noBlankBlocks,\n 'no-defaults': noDefaults,\n 'no-missing-syntax': noMissingSyntax,\n 'no-multi-asterisks': noMultiAsterisks,\n 'no-restricted-syntax': noRestrictedSyntax,\n 'no-types': noTypes,\n 'no-undefined-types': noUndefinedTypes,\n 'require-asterisk-prefix': requireAsteriskPrefix,\n 'require-description': requireDescription,\n 'require-description-complete-sentence': requireDescriptionCompleteSentence,\n 'require-example': requireExample,\n 'require-file-overview': requireFileOverview,\n 'require-hyphen-before-param-description': requireHyphenBeforeParamDescription,\n 'require-jsdoc': requireJsdoc,\n 'require-next-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=next]:not([parsedType.type]))',\n context: 'any',\n message: '@next should have a type',\n },\n ],\n description: 'Requires a type for @next tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-type.md#repos-sticky-header',\n }),\n 'require-param': requireParam,\n 'require-param-description': requireParamDescription,\n 'require-param-name': requireParamName,\n 'require-param-type': requireParamType,\n 'require-property': requireProperty,\n 'require-property-description': requirePropertyDescription,\n 'require-property-name': requirePropertyName,\n 'require-property-type': requirePropertyType,\n 'require-returns': requireReturns,\n 'require-returns-check': requireReturnsCheck,\n 'require-returns-description': requireReturnsDescription,\n 'require-returns-type': requireReturnsType,\n 'require-template': requireTemplate,\n 'require-throws': requireThrows,\n 'require-throws-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=throws]:not([parsedType.type]))',\n context: 'any',\n message: '@throws should have a type',\n },\n ],\n description: 'Requires a type for @throws tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-type.md#repos-sticky-header',\n }),\n 'require-yields': requireYields,\n 'require-yields-check': requireYieldsCheck,\n 'require-yields-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=yields]:not([parsedType.type]))',\n context: 'any',\n message: '@yields should have a type',\n },\n ],\n description: 'Requires a type for @yields tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-type.md#repos-sticky-header',\n }),\n 'sort-tags': sortTags,\n 'tag-lines': tagLines,\n 'text-escaping': textEscaping,\n 'type-formatting': typeFormatting,\n 'valid-types': validTypes,\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedRuleset = (warnOrError, flatName) => {\n return {\n ...(flatName ? {\n name: 'jsdoc/' + flatName,\n } : {}),\n // @ts-expect-error ESLint 8 plugins\n plugins:\n flatName ? {\n jsdoc: index,\n } : [\n 'jsdoc',\n ],\n rules: {\n 'jsdoc/check-access': warnOrError,\n 'jsdoc/check-alignment': warnOrError,\n 'jsdoc/check-examples': 'off',\n 'jsdoc/check-indentation': 'off',\n 'jsdoc/check-line-alignment': 'off',\n 'jsdoc/check-param-names': warnOrError,\n 'jsdoc/check-property-names': warnOrError,\n 'jsdoc/check-syntax': 'off',\n 'jsdoc/check-tag-names': warnOrError,\n 'jsdoc/check-template-names': 'off',\n 'jsdoc/check-types': warnOrError,\n 'jsdoc/check-values': warnOrError,\n 'jsdoc/convert-to-jsdoc-comments': 'off',\n 'jsdoc/empty-tags': warnOrError,\n 'jsdoc/implements-on-classes': warnOrError,\n 'jsdoc/imports-as-dependencies': 'off',\n 'jsdoc/informative-docs': 'off',\n 'jsdoc/lines-before-block': 'off',\n 'jsdoc/match-description': 'off',\n 'jsdoc/match-name': 'off',\n 'jsdoc/multiline-blocks': warnOrError,\n 'jsdoc/no-bad-blocks': 'off',\n 'jsdoc/no-blank-block-descriptions': 'off',\n 'jsdoc/no-blank-blocks': 'off',\n 'jsdoc/no-defaults': warnOrError,\n 'jsdoc/no-missing-syntax': 'off',\n 'jsdoc/no-multi-asterisks': warnOrError,\n 'jsdoc/no-restricted-syntax': 'off',\n 'jsdoc/no-types': 'off',\n 'jsdoc/no-undefined-types': warnOrError,\n 'jsdoc/require-asterisk-prefix': 'off',\n 'jsdoc/require-description': 'off',\n 'jsdoc/require-description-complete-sentence': 'off',\n 'jsdoc/require-example': 'off',\n 'jsdoc/require-file-overview': 'off',\n 'jsdoc/require-hyphen-before-param-description': 'off',\n 'jsdoc/require-jsdoc': warnOrError,\n 'jsdoc/require-next-type': warnOrError,\n 'jsdoc/require-param': warnOrError,\n 'jsdoc/require-param-description': warnOrError,\n 'jsdoc/require-param-name': warnOrError,\n 'jsdoc/require-param-type': warnOrError,\n 'jsdoc/require-property': warnOrError,\n 'jsdoc/require-property-description': warnOrError,\n 'jsdoc/require-property-name': warnOrError,\n 'jsdoc/require-property-type': warnOrError,\n 'jsdoc/require-returns': warnOrError,\n 'jsdoc/require-returns-check': warnOrError,\n 'jsdoc/require-returns-description': warnOrError,\n 'jsdoc/require-returns-type': warnOrError,\n 'jsdoc/require-template': 'off',\n 'jsdoc/require-throws': 'off',\n 'jsdoc/require-throws-type': warnOrError,\n 'jsdoc/require-yields': warnOrError,\n 'jsdoc/require-yields-check': warnOrError,\n 'jsdoc/require-yields-type': warnOrError,\n 'jsdoc/sort-tags': 'off',\n 'jsdoc/tag-lines': warnOrError,\n 'jsdoc/text-escaping': 'off',\n 'jsdoc/type-formatting': 'off',\n 'jsdoc/valid-types': warnOrError,\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedTypeScriptRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedRuleset(warnOrError, flatName);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable @stylistic/indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/check-tag-names': [\n warnOrError, {\n typed: true,\n },\n ],\n 'jsdoc/no-types': warnOrError,\n 'jsdoc/no-undefined-types': 'off',\n 'jsdoc/require-param-type': 'off',\n 'jsdoc/require-property-type': 'off',\n 'jsdoc/require-returns-type': 'off',\n /* eslint-enable @stylistic/indent */\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedTypeScriptFlavorRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedRuleset(warnOrError, flatName);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable @stylistic/indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/no-undefined-types': 'off',\n /* eslint-enable @stylistic/indent */\n },\n };\n};\n\n/**\n * @param {(string | unknown[])[]} ruleNames\n */\nconst createStandaloneRulesetFactory = (ruleNames) => {\n /**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\n return (warnOrError, flatName) => {\n return {\n name: 'jsdoc/' + flatName,\n plugins: {\n jsdoc: index,\n },\n rules: Object.fromEntries(\n ruleNames.map(\n (ruleName) => {\n return (typeof ruleName === 'string' ?\n [\n ruleName, warnOrError,\n ] :\n [\n ruleName[0], [\n warnOrError, ...ruleName.slice(1),\n ],\n ]);\n },\n ),\n ),\n };\n };\n};\n\nconst contentsRules = [\n 'jsdoc/informative-docs',\n 'jsdoc/match-description',\n 'jsdoc/no-blank-block-descriptions',\n 'jsdoc/no-blank-blocks',\n [\n 'jsdoc/text-escaping', {\n escapeHTML: true,\n },\n ],\n];\n\nconst createContentsTypescriptRuleset = createStandaloneRulesetFactory(contentsRules);\n\nconst createContentsTypescriptFlavorRuleset = createStandaloneRulesetFactory(contentsRules);\n\nconst logicalRules = [\n 'jsdoc/check-access',\n 'jsdoc/check-param-names',\n 'jsdoc/check-property-names',\n 'jsdoc/check-syntax',\n 'jsdoc/check-tag-names',\n 'jsdoc/check-template-names',\n 'jsdoc/check-types',\n 'jsdoc/check-values',\n 'jsdoc/empty-tags',\n 'jsdoc/implements-on-classes',\n 'jsdoc/require-returns-check',\n 'jsdoc/require-yields-check',\n 'jsdoc/no-bad-blocks',\n 'jsdoc/no-defaults',\n 'jsdoc/no-types',\n 'jsdoc/no-undefined-types',\n 'jsdoc/valid-types',\n];\n\nconst createLogicalTypescriptRuleset = createStandaloneRulesetFactory(logicalRules);\n\nconst createLogicalTypescriptFlavorRuleset = createStandaloneRulesetFactory(logicalRules);\n\nconst requirementsRules = [\n 'jsdoc/require-example',\n 'jsdoc/require-jsdoc',\n 'jsdoc/require-next-type',\n 'jsdoc/require-param',\n 'jsdoc/require-param-description',\n 'jsdoc/require-param-name',\n 'jsdoc/require-property',\n 'jsdoc/require-property-description',\n 'jsdoc/require-property-name',\n 'jsdoc/require-returns',\n 'jsdoc/require-returns-description',\n 'jsdoc/require-throws-type',\n 'jsdoc/require-yields',\n 'jsdoc/require-yields-type',\n];\n\nconst createRequirementsTypeScriptRuleset = createStandaloneRulesetFactory(requirementsRules);\n\nconst createRequirementsTypeScriptFlavorRuleset = createStandaloneRulesetFactory([\n ...requirementsRules,\n 'jsdoc/require-param-type',\n 'jsdoc/require-property-type',\n 'jsdoc/require-returns-type',\n 'jsdoc/require-template',\n]);\n\nconst stylisticRules = [\n 'jsdoc/check-alignment',\n 'jsdoc/check-line-alignment',\n 'jsdoc/lines-before-block',\n 'jsdoc/multiline-blocks',\n 'jsdoc/no-multi-asterisks',\n 'jsdoc/require-asterisk-prefix',\n [\n 'jsdoc/require-hyphen-before-param-description', 'never',\n ],\n 'jsdoc/tag-lines',\n];\n\nconst createStylisticTypeScriptRuleset = createStandaloneRulesetFactory(stylisticRules);\n\nconst createStylisticTypeScriptFlavorRuleset = createStandaloneRulesetFactory(stylisticRules);\n\n/* c8 ignore next 3 -- TS */\nif (!index.configs) {\n throw new Error('TypeScript guard');\n}\n\nindex.configs.recommended = createRecommendedRuleset('warn');\nindex.configs['recommended-error'] = createRecommendedRuleset('error');\nindex.configs['recommended-typescript'] = createRecommendedTypeScriptRuleset('warn');\nindex.configs['recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error');\nindex.configs['recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn');\nindex.configs['recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error');\n\nindex.configs['flat/recommended'] = createRecommendedRuleset('warn', 'flat/recommended');\nindex.configs['flat/recommended-error'] = createRecommendedRuleset('error', 'flat/recommended-error');\nindex.configs['flat/recommended-typescript'] = createRecommendedTypeScriptRuleset('warn', 'flat/recommended-typescript');\nindex.configs['flat/recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error', 'flat/recommended-typescript-error');\nindex.configs['flat/recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn', 'flat/recommended-typescript-flavor');\nindex.configs['flat/recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error', 'flat/recommended-typescript-flavor-error');\n\nindex.configs['flat/contents-typescript'] = createContentsTypescriptRuleset('warn', 'flat/contents-typescript');\nindex.configs['flat/contents-typescript-error'] = createContentsTypescriptRuleset('error', 'flat/contents-typescript-error');\nindex.configs['flat/contents-typescript-flavor'] = createContentsTypescriptFlavorRuleset('warn', 'flat/contents-typescript-flavor');\nindex.configs['flat/contents-typescript-flavor-error'] = createContentsTypescriptFlavorRuleset('error', 'flat/contents-typescript-error-flavor');\nindex.configs['flat/logical-typescript'] = createLogicalTypescriptRuleset('warn', 'flat/logical-typescript');\nindex.configs['flat/logical-typescript-error'] = createLogicalTypescriptRuleset('error', 'flat/logical-typescript-error');\nindex.configs['flat/logical-typescript-flavor'] = createLogicalTypescriptFlavorRuleset('warn', 'flat/logical-typescript-flavor');\nindex.configs['flat/logical-typescript-flavor-error'] = createLogicalTypescriptFlavorRuleset('error', 'flat/logical-typescript-error-flavor');\nindex.configs['flat/requirements-typescript'] = createRequirementsTypeScriptRuleset('warn', 'flat/requirements-typescript');\nindex.configs['flat/requirements-typescript-error'] = createRequirementsTypeScriptRuleset('error', 'flat/requirements-typescript-error');\nindex.configs['flat/requirements-typescript-flavor'] = createRequirementsTypeScriptFlavorRuleset('warn', 'flat/requirements-typescript-flavor');\nindex.configs['flat/requirements-typescript-flavor-error'] = createRequirementsTypeScriptFlavorRuleset('error', 'flat/requirements-typescript-error-flavor');\nindex.configs['flat/stylistic-typescript'] = createStylisticTypeScriptRuleset('warn', 'flat/stylistic-typescript');\nindex.configs['flat/stylistic-typescript-error'] = createStylisticTypeScriptRuleset('error', 'flat/stylistic-typescript-error');\nindex.configs['flat/stylistic-typescript-flavor'] = createStylisticTypeScriptFlavorRuleset('warn', 'flat/stylistic-typescript-flavor');\nindex.configs['flat/stylistic-typescript-flavor-error'] = createStylisticTypeScriptFlavorRuleset('error', 'flat/stylistic-typescript-error-flavor');\n\nindex.configs.examples = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n files: [\n '**/*.js',\n ],\n name: 'jsdoc/examples/processor',\n plugins: {\n examples: getJsdocProcessorPlugin(),\n },\n processor: 'examples/examples',\n },\n {\n files: [\n '**/*.md/*.js',\n ],\n name: 'jsdoc/examples/rules',\n rules: {\n // \"always\" newline rule at end unlikely in sample code\n '@stylistic/eol-last': 0,\n // Often wish to start `@example` code after newline; also may use\n // empty lines for spacing\n '@stylistic/no-multiple-empty-lines': 0,\n\n // Can generally look nicer to pad a little even if code imposes more stringency\n '@stylistic/padded-blocks': 0,\n\n '@typescript-eslint/no-unused-vars': 0,\n\n // \"always\" newline rule at end unlikely in sample code\n 'eol-last': 0,\n\n // Wouldn't generally expect example paths to resolve relative to JS file\n 'import/no-unresolved': 0,\n\n // Snippets likely too short to always include import/export info\n 'import/unambiguous': 0,\n\n 'jsdoc/require-file-overview': 0,\n\n // The end of a multiline comment would end the comment the example is in.\n 'jsdoc/require-jsdoc': 0,\n\n // See import/no-unresolved\n 'n/no-missing-import': 0,\n\n 'n/no-missing-require': 0,\n\n // Unlikely to have inadvertent debugging within examples\n 'no-console': 0,\n\n // Often wish to start `@example` code after newline; also may use\n // empty lines for spacing\n 'no-multiple-empty-lines': 0,\n\n // Many variables in examples will be `undefined`\n 'no-undef': 0,\n // Common to define variables for clarity without always using them\n 'no-unused-vars': 0,\n\n // See import/no-unresolved\n 'node/no-missing-import': 0,\n 'node/no-missing-require': 0,\n\n // Can generally look nicer to pad a little even if code imposes more stringency\n 'padded-blocks': 0,\n },\n },\n]);\n\nindex.configs['default-expressions'] = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n files: [\n '**/*.js',\n ],\n name: 'jsdoc/default-expressions/processor',\n plugins: {\n examples: getJsdocProcessorPlugin({\n checkDefaults: true,\n checkParams: true,\n checkProperties: true,\n }),\n },\n processor: 'examples/examples',\n },\n {\n files: [\n '**/*.jsdoc-defaults', '**/*.jsdoc-params', '**/*.jsdoc-properties',\n ],\n name: 'jsdoc/default-expressions/rules',\n rules: {\n ...index.configs.examples[1].rules,\n '@stylistic/quotes': [\n 'error', 'double',\n ],\n '@stylistic/semi': [\n 'error', 'never',\n ],\n '@typescript-eslint/no-unused-expressions': 0,\n 'chai-friendly/no-unused-expressions': 0,\n 'no-empty-function': 0,\n 'no-new': 0,\n 'no-unused-expressions': 0,\n quotes: [\n 'error', 'double',\n ],\n semi: [\n 'error', 'never',\n ],\n strict: 0,\n },\n },\n]);\n\nindex.configs['examples-and-default-expressions'] = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n name: 'jsdoc/examples-and-default-expressions',\n plugins: {\n examples: getJsdocProcessorPlugin({\n checkDefaults: true,\n checkParams: true,\n checkProperties: true,\n }),\n },\n },\n ...index.configs.examples.map((config) => {\n return {\n ...config,\n plugins: {},\n };\n }),\n ...index.configs['default-expressions'].map((config) => {\n return {\n ...config,\n plugins: {},\n };\n }),\n]);\n\nexport default index;\n\n/* eslint-disable jsdoc/valid-types -- Bug */\n/**\n * @type {((\n * cfg?: import('eslint').Linter.Config & {\n * config?: `flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,\n * mergeSettings?: boolean,\n * settings?: Partial<import('./iterateJsdoc.js').Settings>,\n * rules?: {[key in keyof import('./rules.d.ts').Rules]?: import('eslint').Linter.RuleEntry<import('./rules.d.ts').Rules[key]>},\n * extraRuleDefinitions?: {\n * forbid: {\n * [contextName: string]: {\n * description?: string,\n * url?: string,\n * contexts: (string|{\n * message: string,\n * context: string,\n * comment: string\n * })[]\n * }\n * }\n * }\n * }\n * ) => import('eslint').Linter.Config)}\n */\nexport const jsdoc = function (cfg) {\n /* eslint-enable jsdoc/valid-types -- Bug */\n /** @type {import('eslint').Linter.Config} */\n let outputConfig = {\n plugins: {\n jsdoc: index,\n },\n };\n\n if (cfg) {\n if (cfg.config) {\n // @ts-expect-error Security check\n if (cfg.config === '__proto__') {\n throw new TypeError('Disallowed config value');\n }\n\n outputConfig = /** @type {import('eslint').Linter.Config} */ (index.configs[cfg.config]);\n }\n\n if (cfg.rules) {\n outputConfig.rules = {\n ...outputConfig.rules,\n ...cfg.rules,\n };\n }\n\n if (cfg.plugins) {\n outputConfig.plugins = {\n ...outputConfig.plugins,\n ...cfg.plugins,\n };\n }\n\n if (cfg.name) {\n outputConfig.name = cfg.name;\n }\n\n if (cfg.basePath) {\n outputConfig.basePath = cfg.basePath;\n }\n\n if (cfg.files) {\n outputConfig.files = cfg.files;\n }\n\n if (cfg.ignores) {\n outputConfig.ignores = cfg.ignores;\n }\n\n if (cfg.language) {\n outputConfig.language = cfg.language;\n }\n\n if (cfg.languageOptions) {\n outputConfig.languageOptions = cfg.languageOptions;\n }\n\n if (cfg.linterOptions) {\n outputConfig.linterOptions = cfg.linterOptions;\n }\n\n if (cfg.processor) {\n outputConfig.processor = cfg.processor;\n }\n\n if (cfg.extraRuleDefinitions) {\n if (!outputConfig.plugins?.jsdoc?.rules) {\n throw new Error('JSDoc plugin required for `extraRuleDefinitions`');\n }\n\n if (cfg.extraRuleDefinitions.forbid) {\n for (const [\n contextName,\n {\n contexts,\n description,\n url,\n },\n ] of Object.entries(cfg.extraRuleDefinitions.forbid)) {\n outputConfig.plugins.jsdoc.rules[`forbid-${contextName}`] =\n buildForbidRuleDefinition({\n contextName,\n contexts,\n description,\n url,\n });\n }\n }\n }\n }\n\n outputConfig.settings = {\n jsdoc: cfg?.mergeSettings === false ?\n cfg.settings :\n merge(\n {},\n cfg?.settings ?? {},\n cfg?.config?.includes('recommended') ?\n {\n // We may need to drop these for \"typescript\" (non-\"flavor\") configs,\n // if support is later added: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html\n structuredTags: {\n next: {\n required: [\n 'type',\n ],\n },\n },\n } :\n {},\n ),\n };\n\n return outputConfig;\n};\n\nexport {\n getJsdocProcessorPlugin,\n} from './getJsdocProcessorPlugin.js';\n"],"mappings":";;;;;;;;;;;;;AAEA,IAAAA,gBAAA,GAAAC,OAAA;AAIA,IAAAC,0BAAA,GAAAD,OAAA;AAGA,IAAAE,wBAAA,GAAAF,OAAA;AAGA,IAAAG,YAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,cAAA,GAAAF,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AACvE,KAAK,CAAC,UAAUyH,WAAW,EAAE,CAAC,GACvD,IAAAnF,oDAAyB,EAAC;YACxBmF,WAAW;YACXlF,QAAQ;YACRI,WAAW;YACXC;UACF,CAAC,CAAC;QACN;MACF;IACF;EACF;EAEAoE,YAAY,CAACW,QAAQ,GAAG;IACtBpD,KAAK,EAAEwC,GAAG,EAAEa,aAAa,KAAK,KAAK,GACjCb,GAAG,CAACY,QAAQ,GACZ,IAAAE,sBAAK,EACH,CAAC,CAAC,EACFd,GAAG,EAAEY,QAAQ,IAAI,CAAC,CAAC,EACnBZ,GAAG,EAAEH,MAAM,EAAEkB,QAAQ,CAAC,aAAa,CAAC,GAClC;MACE;MACA;MACAC,cAAc,EAAE;QACdC,IAAI,EAAE;UACJC,QAAQ,EAAE,CACR,MAAM;QAEV;MACF;IACF,CAAC,GACD,CAAC,CACL;EACJ,CAAC;EAED,OAAOjB,YAAY;AACrB,CAAC;AAACF,OAAA,CAAAvC,KAAA,GAAAA,KAAA","ignoreList":[]}
package/dist/index.d.ts CHANGED
@@ -51,10 +51,10 @@ export type ErrorLevelVariants = "" | "-error";
51
51
  * @typedef {"" | "-error"} ErrorLevelVariants
52
52
  * @type {import('eslint').ESLint.Plugin & {
53
53
  * configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,
54
- * import('eslint').Linter.Config>|Record<"examples"|"default-expressions"|"examples-and-default-expressions", import('eslint').Linter.Config[]>
54
+ * import('eslint').Linter.Config> & Record<"examples"|"default-expressions"|"examples-and-default-expressions", import('eslint').Linter.Config[]>
55
55
  * }}
56
56
  */
57
57
  declare const index: import("eslint").ESLint.Plugin & {
58
- configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`, import("eslint").Linter.Config> | Record<"examples" | "default-expressions" | "examples-and-default-expressions", import("eslint").Linter.Config[]>;
58
+ configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`, import("eslint").Linter.Config> & Record<"examples" | "default-expressions" | "examples-and-default-expressions", import("eslint").Linter.Config[]>;
59
59
  };
60
60
  //# sourceMappingURL=index.d.ts.map
@@ -16,9 +16,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
16
16
  let deps;
17
17
  const setDeps = function () {
18
18
  try {
19
- const pkg = JSON.parse(
20
- // @ts-expect-error It's ok
21
- (0, _fs.readFileSync)((0, _path.join)(process.cwd(), './package.json')));
19
+ const pkg = JSON.parse((0, _fs.readFileSync)((0, _path.join)(process.cwd(), './package.json'), 'utf8'));
22
20
  deps = new Set([...(pkg.dependencies ? /* c8 ignore next 2 */
23
21
  Object.keys(pkg.dependencies) : []), ...(pkg.devDependencies ? /* c8 ignore next 2 */
24
22
  Object.keys(pkg.devDependencies) : [])]);
@@ -75,9 +73,7 @@ var _default = exports.default = (0, _iterateJsdoc.default)(({
75
73
  } else if (!moduleCheck.has(mod)) {
76
74
  let pkg;
77
75
  try {
78
- pkg = JSON.parse(
79
- // @ts-expect-error It's ok
80
- (0, _fs.readFileSync)((0, _path.join)(process.cwd(), 'node_modules', mod, './package.json')));
76
+ pkg = JSON.parse((0, _fs.readFileSync)((0, _path.join)(process.cwd(), 'node_modules', mod, './package.json'), 'utf8'));
81
77
  } catch {
82
78
  // Ignore
83
79
  }
@@ -1 +1 @@
1
- {"version":3,"file":"importsAsDependencies.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","_jsdoccomment","_fs","_nodeModule","_path","e","__esModule","default","deps","setDeps","pkg","JSON","parse","readFileSync","join","process","cwd","Set","dependencies","Object","keys","devDependencies","error","console","log","moduleCheck","Map","_default","exports","iterateJsdoc","jsdoc","settings","utils","undefined","mode","tag","tags","typeAst","tryParse","type","traverse","nde","mod","element","value","replace","test","isBuiltinModule","has","types","typings","set","get","reportJSDoc","iterateAllJsdocs","meta","docs","description","url","module"],"sources":["../../src/rules/importsAsDependencies.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\nimport {\n parse,\n traverse,\n tryParse,\n} from '@es-joy/jsdoccomment';\nimport {\n readFileSync,\n} from 'fs';\nimport {\n isBuiltin as isBuiltinModule,\n} from 'node:module';\nimport {\n join,\n} from 'path';\n\n/**\n * @type {Set<string>|null}\n */\nlet deps;\n\nconst setDeps = function () {\n try {\n const pkg = JSON.parse(\n // @ts-expect-error It's ok\n readFileSync(join(process.cwd(), './package.json')),\n );\n deps = new Set([\n ...(pkg.dependencies ?\n /* c8 ignore next 2 */\n Object.keys(pkg.dependencies) :\n []),\n ...(pkg.devDependencies ?\n /* c8 ignore next 2 */\n Object.keys(pkg.devDependencies) :\n []),\n ]);\n /* c8 ignore next -- our package.json exists */\n } catch (error) {\n /* c8 ignore next -- our package.json exists */\n deps = null;\n /* c8 ignore next 4 -- our package.json exists */\n /* eslint-disable no-console -- Inform user */\n console.log(error);\n /* eslint-enable no-console -- Inform user */\n }\n};\n\nconst moduleCheck = new Map();\n\nexport default iterateJsdoc(({\n jsdoc,\n settings,\n utils,\n}) => {\n if (deps === undefined) {\n setDeps();\n }\n\n /* c8 ignore next 3 -- our package.json exists */\n if (deps === null) {\n return;\n }\n\n const {\n mode,\n } = settings;\n\n for (const tag of jsdoc.tags) {\n let typeAst;\n try {\n typeAst = mode === 'permissive' ? tryParse(tag.type) : parse(tag.type, mode);\n } catch {\n continue;\n }\n\n // eslint-disable-next-line no-loop-func -- Safe\n traverse(typeAst, (nde) => {\n /* c8 ignore next 3 -- TS guard */\n if (deps === null) {\n return;\n }\n\n if (nde.type === 'JsdocTypeImport') {\n let mod = nde.element.value.replace(\n /^(@[^\\/]+\\/[^\\/]+|[^\\/]+).*$/v, '$1',\n );\n\n if ((/^[.\\/]/v).test(mod)) {\n return;\n }\n\n if (isBuiltinModule(mod)) {\n // mod = '@types/node';\n // moduleCheck.set(mod, !deps.has(mod));\n return;\n } else if (!moduleCheck.has(mod)) {\n let pkg;\n try {\n pkg = JSON.parse(\n // @ts-expect-error It's ok\n readFileSync(join(process.cwd(), 'node_modules', mod, './package.json')),\n );\n } catch {\n // Ignore\n }\n\n if (!pkg || (!pkg.types && !pkg.typings)) {\n mod = `@types/${mod}`;\n }\n\n moduleCheck.set(mod, !deps.has(mod));\n }\n\n if (moduleCheck.get(mod)) {\n utils.reportJSDoc(\n 'import points to package which is not found in dependencies',\n tag,\n );\n }\n }\n });\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Reports if JSDoc `import()` statements point to a package which is not listed in `dependencies` or `devDependencies`',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/imports-as-dependencies.md#repos-sticky-header',\n },\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAKA,IAAAE,GAAA,GAAAF,OAAA;AAGA,IAAAG,WAAA,GAAAH,OAAA;AAGA,IAAAI,KAAA,GAAAJ,OAAA;AAEc,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEd;AACA;AACA;AACA,IAAIG,IAAI;AAER,MAAMC,OAAO,GAAG,SAAAA,CAAA,EAAY;EAC1B,IAAI;IACF,MAAMC,GAAG,GAAGC,IAAI,CAACC,KAAK;IACpB;IACA,IAAAC,gBAAY,EAAC,IAAAC,UAAI,EAACC,OAAO,CAACC,GAAG,CAAC,CAAC,EAAE,gBAAgB,CAAC,CACpD,CAAC;IACDR,IAAI,GAAG,IAAIS,GAAG,CAAC,CACb,IAAIP,GAAG,CAACQ,YAAY,GAClB;IACAC,MAAM,CAACC,IAAI,CAACV,GAAG,CAACQ,YAAY,CAAC,GAC7B,EAAE,CAAC,EACL,IAAIR,GAAG,CAACW,eAAe,GACrB;IACAF,MAAM,CAACC,IAAI,CAACV,GAAG,CAACW,eAAe,CAAC,GAChC,EAAE,CAAC,CACN,CAAC;IACJ;EACA,CAAC,CAAC,OA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hC,GAAG;UACP,IAAI;YACFA,GAAG,GAAGC,IAAI,CAACC,KAAK;YACd;YACA,IAAAC,gBAAY,EAAC,IAAAC,UAAI,EAACC,OAAO,CAACC,GAAG,CAAC,CAAC,EAAE,cAAc,EAAE0B,GAAG,EAAE,gBAAgB,CAAC,CACzE,CAAC;UACH,CAAC,CAAC,MAAM;YACN;UAAA;UAGF,IAAI,CAAChC,GAAG,IAAK,CAACA,GAAG,CAACuC,KAAK,IAAI,CAACvC,GAAG,CAACwC,OAAQ,EAAE;YACxCR,GAAG,GAAG,UAAUA,GAAG,EAAE;UACvB;UAEAjB,WAAW,CAAC0B,GAAG,CAACT,GAAG,EAAE,CAAClC,IAAI,CAACwC,GAAG,CAACN,GAAG,CAAC,CAAC;QACtC;QAEA,IAAIjB,WAAW,CAAC2B,GAAG,CAACV,GAAG,CAAC,EAAE;UACxBV,KAAK,CAACqB,WAAW,CACf,6DAA6D,EAC7DlB,GACF,CAAC;QACH;MACF;IACF,CAAC,CAAC;EACJ;AACF,CAAC,EAAE;EACDmB,gBAAgB,EAAE,IAAI;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,sHAAsH;MACnIC,GAAG,EAAE;IACP,CAAC;IACDnB,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAoB,MAAA,CAAA/B,OAAA,GAAAA,OAAA,CAAArB,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"importsAsDependencies.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","_jsdoccomment","_fs","_nodeModule","_path","e","__esModule","default","deps","setDeps","pkg","JSON","parse","readFileSync","join","process","cwd","Set","dependencies","Object","keys","devDependencies","error","console","log","moduleCheck","Map","_default","exports","iterateJsdoc","jsdoc","settings","utils","undefined","mode","tag","tags","typeAst","tryParse","type","traverse","nde","mod","element","value","replace","test","isBuiltinModule","has","types","typings","set","get","reportJSDoc","iterateAllJsdocs","meta","docs","description","url","module"],"sources":["../../src/rules/importsAsDependencies.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\nimport {\n parse,\n traverse,\n tryParse,\n} from '@es-joy/jsdoccomment';\nimport {\n readFileSync,\n} from 'fs';\nimport {\n isBuiltin as isBuiltinModule,\n} from 'node:module';\nimport {\n join,\n} from 'path';\n\n/**\n * @type {Set<string>|null}\n */\nlet deps;\n\nconst setDeps = function () {\n try {\n const pkg = JSON.parse(\n readFileSync(join(process.cwd(), './package.json'), 'utf8'),\n );\n deps = new Set([\n ...(pkg.dependencies ?\n /* c8 ignore next 2 */\n Object.keys(pkg.dependencies) :\n []),\n ...(pkg.devDependencies ?\n /* c8 ignore next 2 */\n Object.keys(pkg.devDependencies) :\n []),\n ]);\n /* c8 ignore next -- our package.json exists */\n } catch (error) {\n /* c8 ignore next -- our package.json exists */\n deps = null;\n /* c8 ignore next 4 -- our package.json exists */\n /* eslint-disable no-console -- Inform user */\n console.log(error);\n /* eslint-enable no-console -- Inform user */\n }\n};\n\nconst moduleCheck = new Map();\n\nexport default iterateJsdoc(({\n jsdoc,\n settings,\n utils,\n}) => {\n if (deps === undefined) {\n setDeps();\n }\n\n /* c8 ignore next 3 -- our package.json exists */\n if (deps === null) {\n return;\n }\n\n const {\n mode,\n } = settings;\n\n for (const tag of jsdoc.tags) {\n let typeAst;\n try {\n typeAst = mode === 'permissive' ? tryParse(tag.type) : parse(tag.type, mode);\n } catch {\n continue;\n }\n\n // eslint-disable-next-line no-loop-func -- Safe\n traverse(typeAst, (nde) => {\n /* c8 ignore next 3 -- TS guard */\n if (deps === null) {\n return;\n }\n\n if (nde.type === 'JsdocTypeImport') {\n let mod = nde.element.value.replace(\n /^(@[^\\/]+\\/[^\\/]+|[^\\/]+).*$/v, '$1',\n );\n\n if ((/^[.\\/]/v).test(mod)) {\n return;\n }\n\n if (isBuiltinModule(mod)) {\n // mod = '@types/node';\n // moduleCheck.set(mod, !deps.has(mod));\n return;\n } else if (!moduleCheck.has(mod)) {\n let pkg;\n try {\n pkg = JSON.parse(\n readFileSync(join(process.cwd(), 'node_modules', mod, './package.json'), 'utf8'),\n );\n } catch {\n // Ignore\n }\n\n if (!pkg || (!pkg.types && !pkg.typings)) {\n mod = `@types/${mod}`;\n }\n\n moduleCheck.set(mod, !deps.has(mod));\n }\n\n if (moduleCheck.get(mod)) {\n utils.reportJSDoc(\n 'import points to package which is not found in dependencies',\n tag,\n );\n }\n }\n });\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Reports if JSDoc `import()` statements point to a package which is not listed in `dependencies` or `devDependencies`',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/imports-as-dependencies.md#repos-sticky-header',\n },\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAKA,IAAAE,GAAA,GAAAF,OAAA;AAGA,IAAAG,WAAA,GAAAH,OAAA;AAGA,IAAAI,KAAA,GAAAJ,OAAA;AAEc,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEd;AACA;AACA;AACA,IAAIG,IAAI;AAER,MAAMC,OAAO,GAAG,SAAAA,CAAA,EAAY;EAC1B,IAAI;IACF,MAAMC,GAAG,GAAGC,IAAI,CAACC,KAAK,CACpB,IAAAC,gBAAY,EAAC,IAAAC,UAAI,EAACC,OAAO,CAACC,GAAG,CAAC,CAAC,EAAE,gBAAgB,CAAC,EAAE,MAAM,CAC5D,CAAC;IACDR,IAAI,GAAG,IAAIS,GAAG,CAAC,CACb,IAAIP,GAAG,CAACQ,YAAY,GAClB;IACAC,MAAM,CAACC,IAAI,CAACV,GAAG,CAACQ,YAAY,CAAC,GAC7B,EAAE,CAAC,EACL,IAAIR,GAAG,CAACW,eAAe,GACrB;IACAF,MAAM,CAACC,IAAI,CAACV,GAAG,CAACW,eAAe,CAA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B,WAAW,CAACuB,GAAG,CAACN,GAAG,CAAC,EAAE;UAChC,IAAIhC,GAAG;UACP,IAAI;YACFA,GAAG,GAAGC,IAAI,CAACC,KAAK,CACd,IAAAC,gBAAY,EAAC,IAAAC,UAAI,EAACC,OAAO,CAACC,GAAG,CAAC,CAAC,EAAE,cAAc,EAAE0B,GAAG,EAAE,gBAAgB,CAAC,EAAE,MAAM,CACjF,CAAC;UACH,CAAC,CAAC,MAAM;YACN;UAAA;UAGF,IAAI,CAAChC,GAAG,IAAK,CAACA,GAAG,CAACuC,KAAK,IAAI,CAACvC,GAAG,CAACwC,OAAQ,EAAE;YACxCR,GAAG,GAAG,UAAUA,GAAG,EAAE;UACvB;UAEAjB,WAAW,CAAC0B,GAAG,CAACT,GAAG,EAAE,CAAClC,IAAI,CAACwC,GAAG,CAACN,GAAG,CAAC,CAAC;QACtC;QAEA,IAAIjB,WAAW,CAAC2B,GAAG,CAACV,GAAG,CAAC,EAAE;UACxBV,KAAK,CAACqB,WAAW,CACf,6DAA6D,EAC7DlB,GACF,CAAC;QACH;MACF;IACF,CAAC,CAAC;EACJ;AACF,CAAC,EAAE;EACDmB,gBAAgB,EAAE,IAAI;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,sHAAsH;MACnIC,GAAG,EAAE;IACP,CAAC;IACDnB,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAoB,MAAA,CAAA/B,OAAA,GAAAA,OAAA,CAAArB,OAAA","ignoreList":[]}
@@ -216,7 +216,7 @@ var _default = exports.default = (0, _iterateJsdoc.default)(({
216
216
  case 'JsdocTypeObjectField':
217
217
  {
218
218
  const typeNode = /** @type {import('jsdoc-type-pratt-parser').ObjectFieldResult} */nde;
219
- if ((objectFieldQuote || typeof typeNode.key === 'string' && !/\s/v.test(typeNode.key)) && typeNode.meta.quote !== (objectFieldQuote ?? undefined)) {
219
+ if ((objectFieldQuote || typeof typeNode.key === 'string' && (/^\p{ID_Start}\p{ID_Continue}*$/v.test(typeNode.key) || /^(\d+(\.\d*)?|\.\d+)([eE][\-+]?\d+)?$/v.test(typeNode.key))) && typeNode.meta.quote !== (objectFieldQuote ?? undefined) && (typeof typeNode.key !== 'string' || !/^(\d+(\.\d*)?|\.\d+)([eE][\-+]?\d+)?$/v.test(typeNode.key))) {
220
220
  typeNode.meta.quote = objectFieldQuote ?? undefined;
221
221
  errorMessage = `Inconsistent object field quotes ${objectFieldQuote}`;
222
222
  }
@@ -1 +1 @@
1
- {"version":3,"file":"typeFormatting.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","_jsdoccomment","e","__esModule","default","_default","exports","iterateJsdoc","context","indent","jsdoc","settings","utils","arrayBrackets","enableFixer","genericDot","objectFieldIndent","objectFieldQuote","objectFieldSeparator","objectFieldSeparatorTrailingPunctuation","propertyQuotes","separatorForSingleObjectField","stringQuotes","typeBracketSpacing","unionSpacing","options","mode","checkTypeFormats","tag","potentialType","type","parsedType","tryParseType","parseType","fix","typeLines","stringify","split","firstTypeLine","shift","lastTypeLine","pop","beginNameOrDescIdx","source","findIndex","tokens","name","description","nameAndDesc","slice","initialNumber","number","src","length","end","postName","postType","undefined","map","typeLine","idx","delimiter","postTag","start","push","firstTagIdx","tg","initialEndSource","find","tags","flatMap","at","errorMessages","startsWith","endsWith","test","traverse","nde","errorMessage","typeNode","left","value","meta","brackets","dot","separator","propertyIndent","trailingPunctuation","key","quote","spacing","differentResult","reportJSDoc","getPresentTags","iterateAllJsdocs","docs","url","fixable","schema","additionalProperties","properties","enum","module"],"sources":["../../src/rules/typeFormatting.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\nimport {\n parse as parseType,\n stringify,\n traverse,\n tryParse as tryParseType,\n} from '@es-joy/jsdoccomment';\n\nexport default iterateJsdoc(({\n context,\n indent,\n jsdoc,\n settings,\n utils,\n}) => {\n const {\n arrayBrackets = 'square',\n enableFixer = true,\n genericDot = false,\n objectFieldIndent = '',\n objectFieldQuote = null,\n objectFieldSeparator = 'comma',\n objectFieldSeparatorTrailingPunctuation = false,\n propertyQuotes = null,\n separatorForSingleObjectField = false,\n stringQuotes = 'single',\n typeBracketSpacing = '',\n unionSpacing = ' ',\n } = context.options[0] || {};\n\n const {\n mode,\n } = settings;\n\n /**\n * @param {import('@es-joy/jsdoccomment').JsdocTagWithInline} tag\n */\n const checkTypeFormats = (tag) => {\n const potentialType = tag.type;\n let parsedType;\n try {\n parsedType = mode === 'permissive' ?\n tryParseType(/** @type {string} */ (potentialType)) :\n parseType(/** @type {string} */ (potentialType), mode);\n } catch {\n return;\n }\n\n const fix = () => {\n const typeLines = stringify(parsedType).split('\\n');\n const firstTypeLine = typeLines.shift();\n const lastTypeLine = typeLines.pop();\n\n const beginNameOrDescIdx = tag.source.findIndex(({\n tokens,\n }) => {\n return tokens.name || tokens.description;\n });\n\n const nameAndDesc = beginNameOrDescIdx === -1 ?\n null :\n tag.source.slice(beginNameOrDescIdx);\n\n const initialNumber = tag.source[0].number;\n const src = [\n // Get inevitably present tag from first `tag.source`\n {\n number: initialNumber,\n source: '',\n tokens: {\n ...tag.source[0].tokens,\n ...(typeLines.length || lastTypeLine ? {\n end: '',\n name: '',\n postName: '',\n postType: '',\n } : {}),\n type: '{' + typeBracketSpacing + firstTypeLine + (!typeLines.length && lastTypeLine === undefined ? typeBracketSpacing + '}' : ''),\n },\n },\n // Get any intervening type lines\n ...(typeLines.length ? typeLines.map((typeLine, idx) => {\n return {\n number: initialNumber + idx + 1,\n source: '',\n tokens: {\n // Grab any delimiter info from first item\n ...tag.source[0].tokens,\n delimiter: tag.source[0].tokens.delimiter === '/**' ? '*' : tag.source[0].tokens.delimiter,\n end: '',\n name: '',\n postName: '',\n postTag: '',\n postType: '',\n start: indent + ' ',\n tag: '',\n type: typeLine,\n },\n };\n }) : []),\n ];\n\n // Merge any final type line and name and description\n if (\n // Name and description may be already included if present with the tag\n nameAndDesc && beginNameOrDescIdx > 0\n ) {\n src.push({\n number: src.length + 1,\n source: '',\n tokens: {\n ...nameAndDesc[0].tokens,\n type: lastTypeLine + typeBracketSpacing + '}',\n },\n });\n\n if (\n // Get any remaining description lines\n nameAndDesc.length > 1\n ) {\n src.push(\n ...nameAndDesc.slice(1).map(({\n source,\n tokens,\n }, idx) => {\n return {\n number: src.length + idx + 2,\n source,\n tokens,\n };\n }),\n );\n }\n } else if (nameAndDesc) {\n if (lastTypeLine) {\n src.push({\n number: src.length + 1,\n source: '',\n tokens: {\n ...nameAndDesc[0].tokens,\n delimiter: nameAndDesc[0].tokens.delimiter === '/**' ? '*' : nameAndDesc[0].tokens.delimiter,\n postTag: '',\n start: indent + ' ',\n tag: '',\n type: lastTypeLine + typeBracketSpacing + '}',\n },\n });\n }\n\n if (\n // Get any remaining description lines\n nameAndDesc.length > 1\n ) {\n src.push(\n ...nameAndDesc.slice(1).map(({\n source,\n tokens,\n }, idx) => {\n return {\n number: src.length + idx + 2,\n source,\n tokens,\n };\n }),\n );\n }\n }\n\n tag.source = src;\n\n // Properly rewire `jsdoc.source`\n const firstTagIdx = jsdoc.source.findIndex(({\n tokens: {\n tag: tg,\n },\n }) => {\n return tg;\n });\n\n const initialEndSource = jsdoc.source.find(({\n tokens: {\n end,\n },\n }) => {\n return end;\n });\n\n jsdoc.source = [\n ...jsdoc.source.slice(0, firstTagIdx),\n ...jsdoc.tags.flatMap(({\n source,\n }) => {\n return source;\n }),\n ];\n\n if (initialEndSource && !jsdoc.source.at(-1)?.tokens?.end) {\n jsdoc.source.push(initialEndSource);\n }\n };\n\n /** @type {string[]} */\n const errorMessages = [];\n\n if (typeBracketSpacing && (!tag.type.startsWith(typeBracketSpacing) || !tag.type.endsWith(typeBracketSpacing))) {\n errorMessages.push(`Must have initial and final \"${typeBracketSpacing}\" spacing`);\n } else if (!typeBracketSpacing && ((/^\\s/v).test(tag.type) || (/\\s$/v).test(tag.type))) {\n errorMessages.push('Must have no initial spacing');\n }\n\n // eslint-disable-next-line complexity -- Todo\n traverse(parsedType, (nde) => {\n let errorMessage = '';\n\n switch (nde.type) {\n case 'JsdocTypeGeneric': {\n const typeNode = /** @type {import('jsdoc-type-pratt-parser').GenericResult} */ (nde);\n if ('value' in typeNode.left && typeNode.left.value === 'Array') {\n if (typeNode.meta.brackets !== arrayBrackets) {\n typeNode.meta.brackets = arrayBrackets;\n errorMessage = `Array bracket style should be ${arrayBrackets}`;\n }\n } else if (typeNode.meta.dot !== genericDot) {\n typeNode.meta.dot = genericDot;\n errorMessage = `Dot usage should be ${genericDot}`;\n }\n\n break;\n }\n\n case 'JsdocTypeObject': {\n const typeNode = /** @type {import('jsdoc-type-pratt-parser').ObjectResult} */ (nde);\n if (\n /* c8 ignore next -- Guard */\n (typeNode.meta.separator ?? 'comma') !== objectFieldSeparator ||\n (typeNode.meta.separatorForSingleObjectField ?? false) !== separatorForSingleObjectField ||\n (typeNode.meta.propertyIndent ?? '') !== objectFieldIndent ||\n (typeNode.meta.trailingPunctuation ?? false) !== objectFieldSeparatorTrailingPunctuation\n ) {\n typeNode.meta.separator = objectFieldSeparator;\n typeNode.meta.separatorForSingleObjectField = separatorForSingleObjectField;\n typeNode.meta.propertyIndent = objectFieldIndent;\n typeNode.meta.trailingPunctuation = objectFieldSeparatorTrailingPunctuation;\n errorMessage = `Inconsistent ${objectFieldSeparator} separator usage`;\n }\n\n break;\n }\n\n case 'JsdocTypeObjectField': {\n const typeNode = /** @type {import('jsdoc-type-pratt-parser').ObjectFieldResult} */ (nde);\n if ((objectFieldQuote ||\n (typeof typeNode.key === 'string' && !(/\\s/v).test(typeNode.key))) &&\n typeNode.meta.quote !== (objectFieldQuote ?? undefined)\n ) {\n typeNode.meta.quote = objectFieldQuote ?? undefined;\n errorMessage = `Inconsistent object field quotes ${objectFieldQuote}`;\n }\n\n break;\n }\n\n case 'JsdocTypeProperty': {\n const typeNode = /** @type {import('jsdoc-type-pratt-parser').PropertyResult} */ (nde);\n\n if ((propertyQuotes ||\n (typeof typeNode.value === 'string' && !(/\\s/v).test(typeNode.value))) &&\n typeNode.meta.quote !== (propertyQuotes ?? undefined)\n ) {\n typeNode.meta.quote = propertyQuotes ?? undefined;\n errorMessage = `Inconsistent ${propertyQuotes} property quotes usage`;\n }\n\n break;\n }\n\n case 'JsdocTypeStringValue': {\n const typeNode = /** @type {import('jsdoc-type-pratt-parser').StringValueResult} */ (nde);\n if (typeNode.meta.quote !== stringQuotes) {\n typeNode.meta.quote = stringQuotes;\n errorMessage = `Inconsistent ${stringQuotes} string quotes usage`;\n }\n\n break;\n }\n\n case 'JsdocTypeUnion': {\n const typeNode = /** @type {import('jsdoc-type-pratt-parser').UnionResult} */ (nde);\n /* c8 ignore next -- Guard */\n if ((typeNode.meta?.spacing ?? ' ') !== unionSpacing) {\n typeNode.meta = {\n spacing: unionSpacing,\n };\n errorMessage = `Inconsistent \"${unionSpacing}\" union spacing usage`;\n }\n\n break;\n }\n\n default:\n break;\n }\n\n if (errorMessage) {\n errorMessages.push(errorMessage);\n }\n });\n\n const differentResult = tag.type !==\n typeBracketSpacing + stringify(parsedType) + typeBracketSpacing;\n\n if (errorMessages.length && differentResult) {\n for (const errorMessage of errorMessages) {\n utils.reportJSDoc(\n errorMessage, tag, enableFixer ? fix : null,\n );\n }\n // Stringification may have been equal previously (and thus no error reported)\n // because the stringification doesn't preserve everything\n } else if (differentResult) {\n utils.reportJSDoc(\n 'There was an error with type formatting', tag, enableFixer ? fix : null,\n );\n }\n };\n\n const tags = utils.getPresentTags([\n 'param',\n 'property',\n 'returns',\n 'this',\n 'throws',\n 'type',\n 'typedef',\n 'yields',\n ]);\n for (const tag of tags) {\n if (tag.type) {\n checkTypeFormats(tag);\n }\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Formats JSDoc type values.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header',\n },\n fixable: 'code',\n schema: [\n {\n additionalProperties: false,\n properties: {\n arrayBrackets: {\n enum: [\n 'angle',\n 'square',\n ],\n },\n enableFixer: {\n type: 'boolean',\n },\n genericDot: {\n type: 'boolean',\n },\n objectFieldIndent: {\n type: 'string',\n },\n objectFieldQuote: {\n enum: [\n 'double',\n 'single',\n null,\n ],\n },\n objectFieldSeparator: {\n enum: [\n 'comma',\n 'comma-and-linebreak',\n 'linebreak',\n 'semicolon',\n 'semicolon-and-linebreak',\n ],\n },\n objectFieldSeparatorTrailingPunctuation: {\n type: 'boolean',\n },\n propertyQuotes: {\n enum: [\n 'double',\n 'single',\n null,\n ],\n },\n separatorForSingleObjectField: {\n type: 'boolean',\n },\n stringQuotes: {\n enum: [\n 'double',\n 'single',\n ],\n },\n typeBracketSpacing: {\n type: 'string',\n },\n unionSpacing: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAK8B,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEf,IAAAG,qBAAY,EAAC,CAAC;EAC3BC,OAAO;EACPC,MAAM;EACNC,KAAK;EACLC,QAAQ;EACRC;AACF,CAAC,KAAK;EACJ,MAAM;IACJC,aAAa,GAAG,QAAQ;IACxBC,WAAW,GAAG,IAAI;IAClBC,UAAU,GAAG,KAAK;IAClBC,iBAAiB,GAAG,EAAE;IACtBC,gBAAgB,GAAG,IAAI;IACvBC,oBAAoB,GAAG,OAAO;IAC9BC,uCAAuC,GAAG,KAAK;IAC/CC,cAAc,GAAG,IAAI;IACrBC,6BAA6B,GAAG,KAAK;IACrCC,YAAY,GAAG,QAAQ;IACvBC,kBAAkB,GAAG,EAAE;IACvBC,YAAY,GAAG;EACjB,CAAC,GAAGhB,OAAO,CAACiB,OAAO,CAAC,CAAC,CAAC,IAAI,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 {"version":3,"file":"typeFormatting.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","_jsdoccomment","e","__esModule","default","_default","exports","iterateJsdoc","context","indent","jsdoc","settings","utils","arrayBrackets","enableFixer","genericDot","objectFieldIndent","objectFieldQuote","objectFieldSeparator","objectFieldSeparatorTrailingPunctuation","propertyQuotes","separatorForSingleObjectField","stringQuotes","typeBracketSpacing","unionSpacing","options","mode","checkTypeFormats","tag","potentialType","type","parsedType","tryParseType","parseType","fix","typeLines","stringify","split","firstTypeLine","shift","lastTypeLine","pop","beginNameOrDescIdx","source","findIndex","tokens","name","description","nameAndDesc","slice","initialNumber","number","src","length","end","postName","postType","undefined","map","typeLine","idx","delimiter","postTag","start","push","firstTagIdx","tg","initialEndSource","find","tags","flatMap","at","errorMessages","startsWith","endsWith","test","traverse","nde","errorMessage","typeNode","left","value","meta","brackets","dot","separator","propertyIndent","trailingPunctuation","key","quote","spacing","differentResult","reportJSDoc","getPresentTags","iterateAllJsdocs","docs","url","fixable","schema","additionalProperties","properties","enum","module"],"sources":["../../src/rules/typeFormatting.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\nimport {\n parse as parseType,\n stringify,\n traverse,\n tryParse as tryParseType,\n} from '@es-joy/jsdoccomment';\n\nexport default iterateJsdoc(({\n context,\n indent,\n jsdoc,\n settings,\n utils,\n}) => {\n const {\n arrayBrackets = 'square',\n enableFixer = true,\n genericDot = false,\n objectFieldIndent = '',\n objectFieldQuote = null,\n objectFieldSeparator = 'comma',\n objectFieldSeparatorTrailingPunctuation = false,\n propertyQuotes = null,\n separatorForSingleObjectField = false,\n stringQuotes = 'single',\n typeBracketSpacing = '',\n unionSpacing = ' ',\n } = context.options[0] || {};\n\n const {\n mode,\n } = settings;\n\n /**\n * @param {import('@es-joy/jsdoccomment').JsdocTagWithInline} tag\n */\n const checkTypeFormats = (tag) => {\n const potentialType = tag.type;\n let parsedType;\n try {\n parsedType = mode === 'permissive' ?\n tryParseType(/** @type {string} */ (potentialType)) :\n parseType(/** @type {string} */ (potentialType), mode);\n } catch {\n return;\n }\n\n const fix = () => {\n const typeLines = stringify(parsedType).split('\\n');\n const firstTypeLine = typeLines.shift();\n const lastTypeLine = typeLines.pop();\n\n const beginNameOrDescIdx = tag.source.findIndex(({\n tokens,\n }) => {\n return tokens.name || tokens.description;\n });\n\n const nameAndDesc = beginNameOrDescIdx === -1 ?\n null :\n tag.source.slice(beginNameOrDescIdx);\n\n const initialNumber = tag.source[0].number;\n const src = [\n // Get inevitably present tag from first `tag.source`\n {\n number: initialNumber,\n source: '',\n tokens: {\n ...tag.source[0].tokens,\n ...(typeLines.length || lastTypeLine ? {\n end: '',\n name: '',\n postName: '',\n postType: '',\n } : {}),\n type: '{' + typeBracketSpacing + firstTypeLine + (!typeLines.length && lastTypeLine === undefined ? typeBracketSpacing + '}' : ''),\n },\n },\n // Get any intervening type lines\n ...(typeLines.length ? typeLines.map((typeLine, idx) => {\n return {\n number: initialNumber + idx + 1,\n source: '',\n tokens: {\n // Grab any delimiter info from first item\n ...tag.source[0].tokens,\n delimiter: tag.source[0].tokens.delimiter === '/**' ? '*' : tag.source[0].tokens.delimiter,\n end: '',\n name: '',\n postName: '',\n postTag: '',\n postType: '',\n start: indent + ' ',\n tag: '',\n type: typeLine,\n },\n };\n }) : []),\n ];\n\n // Merge any final type line and name and description\n if (\n // Name and description may be already included if present with the tag\n nameAndDesc && beginNameOrDescIdx > 0\n ) {\n src.push({\n number: src.length + 1,\n source: '',\n tokens: {\n ...nameAndDesc[0].tokens,\n type: lastTypeLine + typeBracketSpacing + '}',\n },\n });\n\n if (\n // Get any remaining description lines\n nameAndDesc.length > 1\n ) {\n src.push(\n ...nameAndDesc.slice(1).map(({\n source,\n tokens,\n }, idx) => {\n return {\n number: src.length + idx + 2,\n source,\n tokens,\n };\n }),\n );\n }\n } else if (nameAndDesc) {\n if (lastTypeLine) {\n src.push({\n number: src.length + 1,\n source: '',\n tokens: {\n ...nameAndDesc[0].tokens,\n delimiter: nameAndDesc[0].tokens.delimiter === '/**' ? '*' : nameAndDesc[0].tokens.delimiter,\n postTag: '',\n start: indent + ' ',\n tag: '',\n type: lastTypeLine + typeBracketSpacing + '}',\n },\n });\n }\n\n if (\n // Get any remaining description lines\n nameAndDesc.length > 1\n ) {\n src.push(\n ...nameAndDesc.slice(1).map(({\n source,\n tokens,\n }, idx) => {\n return {\n number: src.length + idx + 2,\n source,\n tokens,\n };\n }),\n );\n }\n }\n\n tag.source = src;\n\n // Properly rewire `jsdoc.source`\n const firstTagIdx = jsdoc.source.findIndex(({\n tokens: {\n tag: tg,\n },\n }) => {\n return tg;\n });\n\n const initialEndSource = jsdoc.source.find(({\n tokens: {\n end,\n },\n }) => {\n return end;\n });\n\n jsdoc.source = [\n ...jsdoc.source.slice(0, firstTagIdx),\n ...jsdoc.tags.flatMap(({\n source,\n }) => {\n return source;\n }),\n ];\n\n if (initialEndSource && !jsdoc.source.at(-1)?.tokens?.end) {\n jsdoc.source.push(initialEndSource);\n }\n };\n\n /** @type {string[]} */\n const errorMessages = [];\n\n if (typeBracketSpacing && (!tag.type.startsWith(typeBracketSpacing) || !tag.type.endsWith(typeBracketSpacing))) {\n errorMessages.push(`Must have initial and final \"${typeBracketSpacing}\" spacing`);\n } else if (!typeBracketSpacing && ((/^\\s/v).test(tag.type) || (/\\s$/v).test(tag.type))) {\n errorMessages.push('Must have no initial spacing');\n }\n\n // eslint-disable-next-line complexity -- Todo\n traverse(parsedType, (nde) => {\n let errorMessage = '';\n\n switch (nde.type) {\n case 'JsdocTypeGeneric': {\n const typeNode = /** @type {import('jsdoc-type-pratt-parser').GenericResult} */ (nde);\n if ('value' in typeNode.left && typeNode.left.value === 'Array') {\n if (typeNode.meta.brackets !== arrayBrackets) {\n typeNode.meta.brackets = arrayBrackets;\n errorMessage = `Array bracket style should be ${arrayBrackets}`;\n }\n } else if (typeNode.meta.dot !== genericDot) {\n typeNode.meta.dot = genericDot;\n errorMessage = `Dot usage should be ${genericDot}`;\n }\n\n break;\n }\n\n case 'JsdocTypeObject': {\n const typeNode = /** @type {import('jsdoc-type-pratt-parser').ObjectResult} */ (nde);\n if (\n /* c8 ignore next -- Guard */\n (typeNode.meta.separator ?? 'comma') !== objectFieldSeparator ||\n (typeNode.meta.separatorForSingleObjectField ?? false) !== separatorForSingleObjectField ||\n (typeNode.meta.propertyIndent ?? '') !== objectFieldIndent ||\n (typeNode.meta.trailingPunctuation ?? false) !== objectFieldSeparatorTrailingPunctuation\n ) {\n typeNode.meta.separator = objectFieldSeparator;\n typeNode.meta.separatorForSingleObjectField = separatorForSingleObjectField;\n typeNode.meta.propertyIndent = objectFieldIndent;\n typeNode.meta.trailingPunctuation = objectFieldSeparatorTrailingPunctuation;\n errorMessage = `Inconsistent ${objectFieldSeparator} separator usage`;\n }\n\n break;\n }\n\n case 'JsdocTypeObjectField': {\n const typeNode = /** @type {import('jsdoc-type-pratt-parser').ObjectFieldResult} */ (nde);\n if ((objectFieldQuote ||\n (typeof typeNode.key === 'string' &&\n (\n (/^\\p{ID_Start}\\p{ID_Continue}*$/v).test(typeNode.key) ||\n (/^(\\d+(\\.\\d*)?|\\.\\d+)([eE][\\-+]?\\d+)?$/v).test(typeNode.key)\n )\n )) &&\n typeNode.meta.quote !== (objectFieldQuote ?? undefined) &&\n (typeof typeNode.key !== 'string' ||\n !(/^(\\d+(\\.\\d*)?|\\.\\d+)([eE][\\-+]?\\d+)?$/v).test(typeNode.key))\n ) {\n typeNode.meta.quote = objectFieldQuote ?? undefined;\n errorMessage = `Inconsistent object field quotes ${objectFieldQuote}`;\n }\n\n break;\n }\n\n case 'JsdocTypeProperty': {\n const typeNode = /** @type {import('jsdoc-type-pratt-parser').PropertyResult} */ (nde);\n\n if ((propertyQuotes ||\n (typeof typeNode.value === 'string' && !(/\\s/v).test(typeNode.value))) &&\n typeNode.meta.quote !== (propertyQuotes ?? undefined)\n ) {\n typeNode.meta.quote = propertyQuotes ?? undefined;\n errorMessage = `Inconsistent ${propertyQuotes} property quotes usage`;\n }\n\n break;\n }\n\n case 'JsdocTypeStringValue': {\n const typeNode = /** @type {import('jsdoc-type-pratt-parser').StringValueResult} */ (nde);\n if (typeNode.meta.quote !== stringQuotes) {\n typeNode.meta.quote = stringQuotes;\n errorMessage = `Inconsistent ${stringQuotes} string quotes usage`;\n }\n\n break;\n }\n\n case 'JsdocTypeUnion': {\n const typeNode = /** @type {import('jsdoc-type-pratt-parser').UnionResult} */ (nde);\n /* c8 ignore next -- Guard */\n if ((typeNode.meta?.spacing ?? ' ') !== unionSpacing) {\n typeNode.meta = {\n spacing: unionSpacing,\n };\n errorMessage = `Inconsistent \"${unionSpacing}\" union spacing usage`;\n }\n\n break;\n }\n\n default:\n break;\n }\n\n if (errorMessage) {\n errorMessages.push(errorMessage);\n }\n });\n\n const differentResult = tag.type !==\n typeBracketSpacing + stringify(parsedType) + typeBracketSpacing;\n\n if (errorMessages.length && differentResult) {\n for (const errorMessage of errorMessages) {\n utils.reportJSDoc(\n errorMessage, tag, enableFixer ? fix : null,\n );\n }\n // Stringification may have been equal previously (and thus no error reported)\n // because the stringification doesn't preserve everything\n } else if (differentResult) {\n utils.reportJSDoc(\n 'There was an error with type formatting', tag, enableFixer ? fix : null,\n );\n }\n };\n\n const tags = utils.getPresentTags([\n 'param',\n 'property',\n 'returns',\n 'this',\n 'throws',\n 'type',\n 'typedef',\n 'yields',\n ]);\n for (const tag of tags) {\n if (tag.type) {\n checkTypeFormats(tag);\n }\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Formats JSDoc type values.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header',\n },\n fixable: 'code',\n schema: [\n {\n additionalProperties: false,\n properties: {\n arrayBrackets: {\n enum: [\n 'angle',\n 'square',\n ],\n },\n enableFixer: {\n type: 'boolean',\n },\n genericDot: {\n type: 'boolean',\n },\n objectFieldIndent: {\n type: 'string',\n },\n objectFieldQuote: {\n enum: [\n 'double',\n 'single',\n null,\n ],\n },\n objectFieldSeparator: {\n enum: [\n 'comma',\n 'comma-and-linebreak',\n 'linebreak',\n 'semicolon',\n 'semicolon-and-linebreak',\n ],\n },\n objectFieldSeparatorTrailingPunctuation: {\n type: 'boolean',\n },\n propertyQuotes: {\n enum: [\n 'double',\n 'single',\n null,\n ],\n },\n separatorForSingleObjectField: {\n type: 'boolean',\n },\n stringQuotes: {\n enum: [\n 'double',\n 'single',\n ],\n },\n typeBracketSpacing: {\n type: 'string',\n },\n unionSpacing: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAK8B,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEf,IAAAG,qBAAY,EAAC,CAAC;EAC3BC,OAAO;EACPC,MAAM;EACNC,KAAK;EACLC,QAAQ;EACRC;AACF,CAAC,KAAK;EACJ,MAAM;IACJC,aAAa,GAAG,QAAQ;IACxBC,WAAW,GAAG,IAAI;IAClBC,UAAU,GAAG,KAAK;IAClBC,iBAAiB,GAAG,EAAE;IACtBC,gBAAgB,GAAG,IAAI;IACvBC,oBAAoB,GAAG,OAAO;IAC9BC,uCAAuC,GAAG,KAAK;IAC/CC,cAAc,GAAG,IAAI;IACrBC,6BAA6B,GAAG,KAAK;IACrCC,YAAY,GAAG,QAAQ;IACvBC,kBAAkB,GAAG,EAAE;IACvBC,YAAY,GAAG;EACjB,CAAC,GAAGhB,OAAO,CAACiB,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;EAE5B,MAAM;IACJC;EACF,CAAC,GAAGf,QAAQ;;EAEZ;AACF;AACA;EACE,MAAMgB,gBAAgB,GAAIC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C,CAAC;AAAAwE,MAAA,CAAAhG,OAAA,GAAAA,OAAA,CAAAF,OAAA","ignoreList":[]}
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "@es-joy/jsdoccomment": "~0.58.0",
9
9
  "are-docs-informative": "^0.0.2",
10
10
  "comment-parser": "1.4.1",
11
- "debug": "^4.4.1",
11
+ "debug": "^4.4.3",
12
12
  "escape-string-regexp": "^4.0.0",
13
13
  "espree": "^10.4.0",
14
14
  "esquery": "^1.6.0",
@@ -31,7 +31,7 @@
31
31
  "@eslint/core": "^0.15.2",
32
32
  "@hkdobrev/run-if-changed": "^0.6.3",
33
33
  "@semantic-release/commit-analyzer": "^13.0.1",
34
- "@semantic-release/github": "^11.0.5",
34
+ "@semantic-release/github": "^11.0.6",
35
35
  "@semantic-release/npm": "^12.0.2",
36
36
  "@types/chai": "^5.2.2",
37
37
  "@types/debug": "^4.1.12",
@@ -40,7 +40,7 @@
40
40
  "@types/estree": "^1.0.8",
41
41
  "@types/json-schema": "^7.0.15",
42
42
  "@types/mocha": "^10.0.10",
43
- "@types/node": "^24.3.1",
43
+ "@types/node": "^24.4.0",
44
44
  "@types/semver": "^7.7.1",
45
45
  "@types/spdx-expression-parse": "^3.0.5",
46
46
  "@typescript-eslint/types": "^8.43.0",
@@ -172,5 +172,5 @@
172
172
  "test-cov": "TIMING=1 c8 --reporter text pnpm run test-no-cov",
173
173
  "test-index": "pnpm run test-no-cov test/rules/index.js"
174
174
  },
175
- "version": "57.0.7"
175
+ "version": "57.0.9"
176
176
  }
@@ -30,8 +30,7 @@ import {
30
30
  const {
31
31
  version,
32
32
  } = JSON.parse(
33
- // @ts-expect-error `Buffer` is ok for `JSON.parse`
34
- readFileSync(join(import.meta.dirname, '../package.json')),
33
+ readFileSync(join(import.meta.dirname, '../package.json'), 'utf8'),
35
34
  );
36
35
 
37
36
  // const zeroBasedLineIndexAdjust = -1;
package/src/index-cjs.js CHANGED
@@ -70,7 +70,7 @@ import validTypes from './rules/validTypes.js';
70
70
  * @typedef {"" | "-error"} ErrorLevelVariants
71
71
  * @type {import('eslint').ESLint.Plugin & {
72
72
  * configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,
73
- * import('eslint').Linter.Config>|Record<"examples"|"default-expressions"|"examples-and-default-expressions", import('eslint').Linter.Config[]>
73
+ * import('eslint').Linter.Config> & Record<"examples"|"default-expressions"|"examples-and-default-expressions", import('eslint').Linter.Config[]>
74
74
  * }}
75
75
  */
76
76
  const index = {};
package/src/index.js CHANGED
@@ -76,7 +76,7 @@ import validTypes from './rules/validTypes.js';
76
76
  * @typedef {"" | "-error"} ErrorLevelVariants
77
77
  * @type {import('eslint').ESLint.Plugin & {
78
78
  * configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,
79
- * import('eslint').Linter.Config>|Record<"examples"|"default-expressions"|"examples-and-default-expressions", import('eslint').Linter.Config[]>
79
+ * import('eslint').Linter.Config> & Record<"examples"|"default-expressions"|"examples-and-default-expressions", import('eslint').Linter.Config[]>
80
80
  * }}
81
81
  */
82
82
  const index = {};
@@ -22,8 +22,7 @@ let deps;
22
22
  const setDeps = function () {
23
23
  try {
24
24
  const pkg = JSON.parse(
25
- // @ts-expect-error It's ok
26
- readFileSync(join(process.cwd(), './package.json')),
25
+ readFileSync(join(process.cwd(), './package.json'), 'utf8'),
27
26
  );
28
27
  deps = new Set([
29
28
  ...(pkg.dependencies ?
@@ -98,8 +97,7 @@ export default iterateJsdoc(({
98
97
  let pkg;
99
98
  try {
100
99
  pkg = JSON.parse(
101
- // @ts-expect-error It's ok
102
- readFileSync(join(process.cwd(), 'node_modules', mod, './package.json')),
100
+ readFileSync(join(process.cwd(), 'node_modules', mod, './package.json'), 'utf8'),
103
101
  );
104
102
  } catch {
105
103
  // Ignore
@@ -250,8 +250,15 @@ export default iterateJsdoc(({
250
250
  case 'JsdocTypeObjectField': {
251
251
  const typeNode = /** @type {import('jsdoc-type-pratt-parser').ObjectFieldResult} */ (nde);
252
252
  if ((objectFieldQuote ||
253
- (typeof typeNode.key === 'string' && !(/\s/v).test(typeNode.key))) &&
254
- typeNode.meta.quote !== (objectFieldQuote ?? undefined)
253
+ (typeof typeNode.key === 'string' &&
254
+ (
255
+ (/^\p{ID_Start}\p{ID_Continue}*$/v).test(typeNode.key) ||
256
+ (/^(\d+(\.\d*)?|\.\d+)([eE][\-+]?\d+)?$/v).test(typeNode.key)
257
+ )
258
+ )) &&
259
+ typeNode.meta.quote !== (objectFieldQuote ?? undefined) &&
260
+ (typeof typeNode.key !== 'string' ||
261
+ !(/^(\d+(\.\d*)?|\.\d+)([eE][\-+]?\d+)?$/v).test(typeNode.key))
255
262
  ) {
256
263
  typeNode.meta.quote = objectFieldQuote ?? undefined;
257
264
  errorMessage = `Inconsistent object field quotes ${objectFieldQuote}`;