eslint-plugin-jsdoc 55.1.2 → 55.3.0

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.
package/README.md CHANGED
@@ -60,7 +60,7 @@ export default [
60
60
  ];
61
61
  ```
62
62
 
63
- Or with TypeScript-aware extra rules and settings supplied:
63
+ Or with TypeScript-aware extra rules and/or settings supplied:
64
64
 
65
65
  ```js
66
66
  import {jsdoc} from 'eslint-plugin-jsdoc';
@@ -118,6 +118,10 @@ export default [
118
118
  ];
119
119
  ```
120
120
 
121
+ A `plugins` property can also be supplied to merge with the resulting `jsdoc` plugin.
122
+
123
+ Other config properties such as `files`, `ignores`, etc. are also copied over.
124
+
121
125
  <a name="user-content-eslint-plugin-jsdoc-configuration-flat-config-declarative"></a>
122
126
  <a name="eslint-plugin-jsdoc-configuration-flat-config-declarative"></a>
123
127
  ### Flat config (declarative)
@@ -210,19 +210,19 @@ export default iterateJsdoc(({
210
210
  newLine: `import ${camelCasedRuleName} from './rules/${camelCasedRuleName}.js';`,
211
211
  oldIsCamel: true,
212
212
  oldRegex: /\nimport (?<oldRule>[^ ]*) from '.\/rules\/\1\.js';/gv,
213
- path: './src/index.js'
213
+ path: './src/index-cjs.js'
214
214
  });
215
215
  await replaceInOrder({
216
216
  checkName: 'index recommended',
217
217
  newLine: `${' '.repeat(6)}'jsdoc/${ruleName}': ${recommended ? 'warnOrError' : '\'off\''},`,
218
218
  oldRegex: /\n\s{6}'jsdoc\/(?<oldRule>[^']*)': .*?,/gv,
219
- path: './src/index.js'
219
+ path: './src/index-cjs.js'
220
220
  });
221
221
  await replaceInOrder({
222
222
  checkName: 'index rules',
223
- newLine: `${' '.repeat(4)}'${ruleName}': ${camelCasedRuleName},`,
223
+ newLine: `${' '.repeat(2)}'${ruleName}': ${camelCasedRuleName},`,
224
224
  oldRegex: /\n\s{2}'(?<oldRule>[^']*)': [^,]*,/gv,
225
- path: './src/index.js'
225
+ path: './src/index-cjs.js'
226
226
  });
227
227
  await Promise.resolve().then(() => _interopRequireWildcard(require('./generateDocs.js')));
228
228
 
@@ -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.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.js',\n });\n\n await replaceInOrder({\n checkName: 'index rules',\n newLine: `${' '.repeat(4)}'${ruleName}': ${camelCasedRuleName},`,\n oldRegex: /\\n\\s{2}'(?<oldRule>[^']*)': [^,]*,/gv,\n path: './src/index.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,IA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AAE,uDAAuD;IACjEC,IAAI,EAAE;EACR,CAAC,CAAC;EAEF,MAAML,cAAc,CAAC;IACnBC,SAAS,EAAE,mBAAmB;IAC9BC,OAAO,EAAE,GAAG,GAAG,CAACqB,MAAM,CAAC,CAAC,CAAC,UAAUpD,QAAQ,MAAMI,WAAW,GAAG,aAAa,GAAG,SAAS,GAAG;IAC3F6B,QAAQ,EAAE,2CAA2C;IACrDC,IAAI,EAAE;EACR,CAAC,CAAC;EAEF,MAAML,cAAc,CAAC;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 // @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,CAAAb,CAAA,GAAAQ,CAAA,CAAAM,GAAA,CAAAd,CAAA,EAAAU,CAAA,gBAAAN,CAAA,IAAAJ,CAAA,gBAAAI,CAAA,OAAAW,cAAA,CAAAC,I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ChEY,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":[]}
@@ -61,6 +61,7 @@ var _requireYieldsCheck = _interopRequireDefault(require("./rules/requireYieldsC
61
61
  var _sortTags = _interopRequireDefault(require("./rules/sortTags.cjs"));
62
62
  var _tagLines = _interopRequireDefault(require("./rules/tagLines.cjs"));
63
63
  var _textEscaping = _interopRequireDefault(require("./rules/textEscaping.cjs"));
64
+ var _typeFormatting = _interopRequireDefault(require("./rules/typeFormatting.cjs"));
64
65
  var _validTypes = _interopRequireDefault(require("./rules/validTypes.cjs"));
65
66
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
66
67
  /* eslint-disable jsdoc/valid-types -- Bug */
@@ -133,6 +134,7 @@ index.rules = {
133
134
  'sort-tags': _sortTags.default,
134
135
  'tag-lines': _tagLines.default,
135
136
  'text-escaping': _textEscaping.default,
137
+ 'type-formatting': _typeFormatting.default,
136
138
  'valid-types': _validTypes.default
137
139
  };
138
140
 
@@ -207,6 +209,7 @@ const createRecommendedRuleset = (warnOrError, flatName) => {
207
209
  'jsdoc/sort-tags': 'off',
208
210
  'jsdoc/tag-lines': warnOrError,
209
211
  'jsdoc/text-escaping': 'off',
212
+ 'jsdoc/type-formatting': 'off',
210
213
  'jsdoc/valid-types': warnOrError
211
214
  }
212
215
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index-cjs.cjs","names":["_getJsdocProcessorPlugin","require","_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","_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","requireParam","requireParamDescription","requireParamName","requireParamType","requireProperty","requirePropertyDescription","requirePropertyName","requirePropertyType","requireReturns","requireReturnsCheck","requireReturnsDescription","requireReturnsType","requireTemplate","requireThrows","requireYields","requireYieldsCheck","sortTags","tagLines","textEscaping","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 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 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>\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-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-yields': requireYields,\n 'require-yields-check': requireYieldsCheck,\n 'sort-tags': sortTags,\n 'tag-lines': tagLines,\n 'text-escaping': textEscaping,\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-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-yields': warnOrError,\n 'jsdoc/require-yields-check': warnOrError,\n 'jsdoc/sort-tags': 'off',\n 'jsdoc/tag-lines': warnOrError,\n 'jsdoc/text-escaping': '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-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-yields',\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 '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 // 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\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 '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,wBAAA,GAAAC,OAAA;AAGA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,eAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,cAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,iBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,mBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,gBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,mBAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,YAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,cAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,mBAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,WAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,YAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,uBAAA,GAAAZ,sBAAA,CAAAF,OAAA;AACA,IAAAe,UAAA,GAAAb,sBAAA,CAAAF,OAAA;AACA,IAAAgB,oBAAA,GAAAd,sBAAA,CAAAF,OAAA;AACA,IAAAiB,sBAAA,G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pE;EACD9B,IAAI,EAAE,iCAAiC;EACvC7D,KAAK,EAAE;IACL,GAAGF,KAAK,CAACC,OAAO,CAAC2F,QAAQ,CAAC,CAAC,CAAC,CAAC1F,KAAK;IAClC,qCAAqC,EAAE,CAAC;IACxC,mBAAmB,EAAE,CAAC;IACtB,QAAQ,EAAE,CAAC;IACX,uBAAuB,EAAE,CAAC;IAC1BiG,MAAM,EAAE,CACN,OAAO,EAAE,QAAQ,CAClB;IACDC,IAAI,EAAE,CACJ,OAAO,EAAE,OAAO,CACjB;IACDC,MAAM,EAAE;EACV;AACF,CAAC,CACD;AAEFrG,KAAK,CAACC,OAAO,CAAC,kCAAkC,CAAC,GAAG,+CAAiD,CACnG;EACE8D,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,GAAGlG,KAAK,CAACC,OAAO,CAAC2F,QAAQ,CAAClB,GAAG,CAAE4B,MAAM,IAAK;EACxC,OAAO;IACL,GAAGA,MAAM;IACTtC,OAAO,EAAE,CAAC;EACZ,CAAC;AACH,CAAC,CAAC,EACF,GAAGhE,KAAK,CAACC,OAAO,CAAC,qBAAqB,CAAC,CAACyE,GAAG,CAAE4B,MAAM,IAAK;EACtD,OAAO;IACL,GAAGA,MAAM;IACTtC,OAAO,EAAE,CAAC;EACZ,CAAC;AACH,CAAC,CAAC,CACF;AAAC,IAAAuC,QAAA,GAAAC,OAAA,CAAAzG,OAAA,GAEYC,KAAK;AAAAyG,MAAA,CAAAD,OAAA,GAAAA,OAAA,CAAAzG,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"index-cjs.cjs","names":["_getJsdocProcessorPlugin","require","_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","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 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>\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-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-yields': requireYields,\n 'require-yields-check': requireYieldsCheck,\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-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-yields': warnOrError,\n 'jsdoc/require-yields-check': 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-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-yields',\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 '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 // 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\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 '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,wBAAA,GAAAC,OAAA;AAGA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,eAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,cAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,iBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,mBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,gBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,mBAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,YAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,cAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,mBAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,WAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,YAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,uBAAA,GAAAZ,sBAAA,CAAAF,OAAA;AACA,IAAAe,UAAA,GAAAb,sBAAA,CAAAF,OAAA;AACA,IAAAgB,oBAAA,GAAAd,sBAAA,CAAAF,OAAA;AACA,IAAAiB,sBAAA,G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perty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.jsdoc = exports.default = void 0;
6
+ exports.default = void 0;
7
+ Object.defineProperty(exports, "getJsdocProcessorPlugin", {
8
+ enumerable: true,
9
+ get: function () {
10
+ return _getJsdocProcessorPlugin.getJsdocProcessorPlugin;
11
+ }
12
+ });
13
+ exports.jsdoc = void 0;
7
14
  var _objectDeepMerge = require("object-deep-merge");
8
15
  var _indexCjs = _interopRequireDefault(require("./index-cjs.cjs"));
16
+ var _getJsdocProcessorPlugin = require("./getJsdocProcessorPlugin.cjs");
9
17
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
18
  /* eslint-disable perfectionist/sort-imports -- For auto-generate; Do not remove */
11
19
  // BEGIN REPLACE
@@ -14,7 +22,7 @@ var _default = exports.default = _indexCjs.default; // END REPLACE
14
22
  /* eslint-disable jsdoc/valid-types -- Bug */
15
23
  /**
16
24
  * @type {((
17
- * cfg?: {
25
+ * cfg?: import('eslint').Linter.Config & {
18
26
  * mergeSettings?: boolean,
19
27
  * config?: `flat/${import('./index-cjs.js').ConfigGroups}${import('./index-cjs.js').ConfigVariants}${import('./index-cjs.js').ErrorLevelVariants}`,
20
28
  * settings?: Partial<import('./iterateJsdoc.js').Settings>,
@@ -30,15 +38,50 @@ const jsdoc = function (cfg) {
30
38
  jsdoc: _indexCjs.default
31
39
  }
32
40
  };
33
- if (cfg?.config) {
34
- // @ts-expect-error Security check
35
- if (cfg.config === '__proto__') {
36
- throw new TypeError('Disallowed config value');
41
+ if (cfg) {
42
+ if (cfg.config) {
43
+ // @ts-expect-error Security check
44
+ if (cfg.config === '__proto__') {
45
+ throw new TypeError('Disallowed config value');
46
+ }
47
+ outputConfig = _indexCjs.default.configs[cfg.config];
48
+ }
49
+ if (cfg.rules) {
50
+ outputConfig.rules = {
51
+ ...outputConfig.rules,
52
+ ...cfg.rules
53
+ };
54
+ }
55
+ if (cfg.plugins) {
56
+ outputConfig.plugins = {
57
+ ...outputConfig.plugins,
58
+ ...cfg.plugins
59
+ };
60
+ }
61
+ if (cfg.name) {
62
+ outputConfig.name = cfg.name;
63
+ }
64
+ if (cfg.basePath) {
65
+ outputConfig.basePath = cfg.basePath;
66
+ }
67
+ if (cfg.files) {
68
+ outputConfig.files = cfg.files;
69
+ }
70
+ if (cfg.ignores) {
71
+ outputConfig.ignores = cfg.ignores;
72
+ }
73
+ if (cfg.language) {
74
+ outputConfig.language = cfg.language;
75
+ }
76
+ if (cfg.languageOptions) {
77
+ outputConfig.languageOptions = cfg.languageOptions;
78
+ }
79
+ if (cfg.linterOptions) {
80
+ outputConfig.linterOptions = cfg.linterOptions;
81
+ }
82
+ if (cfg.processor) {
83
+ outputConfig.processor = cfg.processor;
37
84
  }
38
- outputConfig = _indexCjs.default.configs[cfg.config];
39
- }
40
- if (cfg?.rules) {
41
- outputConfig.rules = cfg.rules;
42
85
  }
43
86
  outputConfig.settings = {
44
87
  jsdoc: cfg?.mergeSettings === false ? cfg.settings : (0, _objectDeepMerge.merge)({}, cfg?.settings ?? {}, cfg?.config?.includes('recommended') ? {
@@ -1 +1 @@
1
- {"version":3,"file":"index-esm.cjs","names":["_objectDeepMerge","require","_indexCjs","_interopRequireDefault","e","__esModule","default","_default","exports","index","jsdoc","cfg","outputConfig","plugins","config","TypeError","configs","rules","settings","mergeSettings","merge","includes","structuredTags","next","required","throws","yields"],"sources":["../src/index-esm.js"],"sourcesContent":["/* eslint-disable perfectionist/sort-imports -- For auto-generate; Do not remove */\nimport {\n merge,\n} from 'object-deep-merge';\n\n// BEGIN REPLACE\nimport index from './index-cjs.js';\n\n// eslint-disable-next-line unicorn/prefer-export-from --- Reusing `index`\nexport default index;\n// END REPLACE\n\n/* eslint-disable jsdoc/valid-types -- Bug */\n/**\n * @type {((\n * cfg?: {\n * mergeSettings?: boolean,\n * config?: `flat/${import('./index-cjs.js').ConfigGroups}${import('./index-cjs.js').ConfigVariants}${import('./index-cjs.js').ErrorLevelVariants}`,\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 * }\n * ) => import('eslint').Linter.Config)}\n */\n/* eslint-enable jsdoc/valid-types -- Bug */\nexport const jsdoc = function (cfg) {\n /** @type {import('eslint').Linter.Config} */\n let outputConfig = {\n plugins: {\n jsdoc: index,\n },\n };\n if (\n cfg?.config\n ) {\n // @ts-expect-error Security check\n if (cfg.config === '__proto__') {\n throw new TypeError('Disallowed config value');\n }\n\n outputConfig = index.configs[cfg.config];\n }\n\n if (cfg?.rules) {\n outputConfig.rules = cfg.rules;\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 throws: {\n required: [\n 'type',\n ],\n },\n yields: {\n required: [\n 'type',\n ],\n },\n },\n } :\n {},\n ),\n };\n\n return outputConfig;\n};\n"],"mappings":";;;;;;AACA,IAAAA,gBAAA,GAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAmC,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AANnC;AAKA;AAGA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GACeG,iBAAK,EACpB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,KAAK,GAAG,SAAAA,CAAUC,GAAG,EAAE;EAClC;EACA,IAAIC,YAAY,GAAG;IACjBC,OAAO,EAAE;MACPH,KAAK,EAAED;IACT;EACF,CAAC;EACD,IACEE,GAAG,EAAEG,MAAM,EACX;IACA;IACA,IAAIH,GAAG,CAACG,MAAM,KAAK,WAAW,EAAE;MAC9B,MAAM,IAAIC,SAAS,CAAC,yBAAyB,CAAC;IAChD;IAEAH,YAAY,GAAGH,iBAAK,CAACO,OAAO,CAACL,GAAG,CAACG,MAAM,CAAC;EAC1C;EAEA,IAAIH,GAAG,EAAEM,KAAK,EAAE;IACdL,YAAY,CAACK,KAAK,GAAGN,GAAG,CAACM,KAAK;EAChC;EAEAL,YAAY,CAACM,QAAQ,GAAG;IACtBR,KAAK,EAAEC,GAAG,EAAEQ,aAAa,KAAK,KAAK,GACjCR,GAAG,CAACO,QAAQ,GACZ,IAAAE,sBAAK,EACH,CAAC,CAAC,EACFT,GAAG,EAAEO,QAAQ,IAAI,CAAC,CAAC,EACnBP,GAAG,EAAEG,MAAM,EAAEO,QAAQ,CAAC,aAAa,CAAC,GAClC;MACE;MACA;MACAC,cAAc,EAAE;QACdC,IAAI,EAAE;UACJC,QAAQ,EAAE,CACR,MAAM;QAEV,CAAC;QACDC,MAAM,EAAE;UACND,QAAQ,EAAE,CACR,MAAM;QAEV,CAAC;QACDE,MAAM,EAAE;UACNF,QAAQ,EAAE,CACR,MAAM;QAEV;MACF;IACF,CAAC,GACD,CAAC,CACL;EACJ,CAAC;EAED,OAAOZ,YAAY;AACrB,CAAC;AAACJ,OAAA,CAAAE,KAAA,GAAAA,KAAA","ignoreList":[]}
1
+ {"version":3,"file":"index-esm.cjs","names":["_objectDeepMerge","require","_indexCjs","_interopRequireDefault","_getJsdocProcessorPlugin","e","__esModule","default","_default","exports","index","jsdoc","cfg","outputConfig","plugins","config","TypeError","configs","rules","name","basePath","files","ignores","language","languageOptions","linterOptions","processor","settings","mergeSettings","merge","includes","structuredTags","next","required","throws","yields"],"sources":["../src/index-esm.js"],"sourcesContent":["/* eslint-disable perfectionist/sort-imports -- For auto-generate; Do not remove */\nimport {\n merge,\n} from 'object-deep-merge';\n\n// BEGIN REPLACE\nimport index from './index-cjs.js';\n\n// eslint-disable-next-line unicorn/prefer-export-from --- Reusing `index`\nexport default index;\n// END REPLACE\n\n/* eslint-disable jsdoc/valid-types -- Bug */\n/**\n * @type {((\n * cfg?: import('eslint').Linter.Config & {\n * mergeSettings?: boolean,\n * config?: `flat/${import('./index-cjs.js').ConfigGroups}${import('./index-cjs.js').ConfigVariants}${import('./index-cjs.js').ErrorLevelVariants}`,\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 * }\n * ) => import('eslint').Linter.Config)}\n */\n/* eslint-enable jsdoc/valid-types -- Bug */\nexport const jsdoc = function (cfg) {\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 = 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\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 throws: {\n required: [\n 'type',\n ],\n },\n yields: {\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":";;;;;;;;;;;;;AACA,IAAAA,gBAAA,GAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AAsHA,IAAAG,wBAAA,GAAAH,OAAA;AAEsC,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA9HtC;AAKA;AAGA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GACeG,iBAAK,EACpB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,KAAK,GAAG,SAAAA,CAAUC,GAAG,EAAE;EAClC;EACA,IAAIC,YAAY,GAAG;IACjBC,OAAO,EAAE;MACPH,KAAK,EAAED;IACT;EACF,CAAC;EAED,IAAIE,GAAG,EAAE;IACP,IAAIA,GAAG,CAACG,MAAM,EAAE;MACd;MACA,IAAIH,GAAG,CAACG,MAAM,KAAK,WAAW,EAAE;QAC9B,MAAM,IAAIC,SAAS,CAAC,yBAAyB,CAAC;MAChD;MAEAH,YAAY,GAAGH,iBAAK,CAACO,OAAO,CAACL,GAAG,CAACG,MAAM,CAAC;IAC1C;IAEA,IAAIH,GAAG,CAACM,KAAK,EAAE;MACbL,YAAY,CAACK,KAAK,GAAG;QACnB,GAAGL,YAAY,CAACK,KAAK;QACrB,GAAGN,GAAG,CAACM;MACT,CAAC;IACH;IAEA,IAAIN,GAAG,CAACE,OAAO,EAAE;M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AE;UACND,QAAQ,EAAE,CACR,MAAM;QAEV,CAAC;QACDE,MAAM,EAAE;UACNF,QAAQ,EAAE,CACR,MAAM;QAEV;MACF;IACF,CAAC,GACD,CAAC,CACL;EACJ,CAAC;EAED,OAAOpB,YAAY;AACrB,CAAC;AAACJ,OAAA,CAAAE,KAAA,GAAAA,KAAA","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  export default index;
2
2
  /**
3
3
  * @type {((
4
- * cfg?: {
4
+ * cfg?: import('eslint').Linter.Config & {
5
5
  * mergeSettings?: boolean,
6
6
  * config?: `flat/${import('./index-cjs.js').ConfigGroups}${import('./index-cjs.js').ConfigVariants}${import('./index-cjs.js').ErrorLevelVariants}`,
7
7
  * settings?: Partial<import('./iterateJsdoc.js').Settings>,
@@ -9,11 +9,12 @@ export default index;
9
9
  * }
10
10
  * ) => import('eslint').Linter.Config)}
11
11
  */
12
- export const jsdoc: ((cfg?: {
12
+ export const jsdoc: ((cfg?: import("eslint").Linter.Config & {
13
13
  mergeSettings?: boolean;
14
14
  config?: `flat/${import("./index-cjs.js").ConfigGroups}${import("./index-cjs.js").ConfigVariants}${import("./index-cjs.js").ErrorLevelVariants}`;
15
15
  settings?: Partial<import("./iterateJsdoc.js").Settings>;
16
16
  rules?: { [key in keyof import("./rules.d.ts").Rules]?: import("eslint").Linter.RuleEntry<import("./rules.d.ts").Rules[key]>; };
17
17
  }) => import("eslint").Linter.Config);
18
+ export { getJsdocProcessorPlugin } from "./getJsdocProcessorPlugin.js";
18
19
  import index from './index-cjs.js';
19
20
  //# sourceMappingURL=index-esm.d.ts.map
package/dist/index.cjs CHANGED
@@ -3,7 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.jsdoc = exports.default = void 0;
6
+ exports.default = void 0;
7
+ Object.defineProperty(exports, "getJsdocProcessorPlugin", {
8
+ enumerable: true,
9
+ get: function () {
10
+ return _getJsdocProcessorPlugin.getJsdocProcessorPlugin;
11
+ }
12
+ });
13
+ exports.jsdoc = void 0;
7
14
  var _objectDeepMerge = require("object-deep-merge");
8
15
  var _getJsdocProcessorPlugin = require("./getJsdocProcessorPlugin.cjs");
9
16
  var _checkAccess = _interopRequireDefault(require("./rules/checkAccess.cjs"));
@@ -62,6 +69,7 @@ var _requireYieldsCheck = _interopRequireDefault(require("./rules/requireYieldsC
62
69
  var _sortTags = _interopRequireDefault(require("./rules/sortTags.cjs"));
63
70
  var _tagLines = _interopRequireDefault(require("./rules/tagLines.cjs"));
64
71
  var _textEscaping = _interopRequireDefault(require("./rules/textEscaping.cjs"));
72
+ var _typeFormatting = _interopRequireDefault(require("./rules/typeFormatting.cjs"));
65
73
  var _validTypes = _interopRequireDefault(require("./rules/validTypes.cjs"));
66
74
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
67
75
  /* AUTO-GENERATED BY build SCRIPT */
@@ -137,6 +145,7 @@ index.rules = {
137
145
  'sort-tags': _sortTags.default,
138
146
  'tag-lines': _tagLines.default,
139
147
  'text-escaping': _textEscaping.default,
148
+ 'type-formatting': _typeFormatting.default,
140
149
  'valid-types': _validTypes.default
141
150
  };
142
151
 
@@ -211,6 +220,7 @@ const createRecommendedRuleset = (warnOrError, flatName) => {
211
220
  'jsdoc/sort-tags': 'off',
212
221
  'jsdoc/tag-lines': warnOrError,
213
222
  'jsdoc/text-escaping': 'off',
223
+ 'jsdoc/type-formatting': 'off',
214
224
  'jsdoc/valid-types': warnOrError
215
225
  }
216
226
  };
@@ -412,7 +422,7 @@ var _default = exports.default = index;
412
422
  /* eslint-disable jsdoc/valid-types -- Bug */
413
423
  /**
414
424
  * @type {((
415
- * cfg?: {
425
+ * cfg?: import('eslint').Linter.Config & {
416
426
  * mergeSettings?: boolean,
417
427
  * config?: `flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,
418
428
  * settings?: Partial<import('./iterateJsdoc.js').Settings>,
@@ -428,15 +438,50 @@ const jsdoc = function (cfg) {
428
438
  jsdoc: index
429
439
  }
430
440
  };
431
- if (cfg?.config) {
432
- // @ts-expect-error Security check
433
- if (cfg.config === '__proto__') {
434
- throw new TypeError('Disallowed config value');
441
+ if (cfg) {
442
+ if (cfg.config) {
443
+ // @ts-expect-error Security check
444
+ if (cfg.config === '__proto__') {
445
+ throw new TypeError('Disallowed config value');
446
+ }
447
+ outputConfig = index.configs[cfg.config];
448
+ }
449
+ if (cfg.rules) {
450
+ outputConfig.rules = {
451
+ ...outputConfig.rules,
452
+ ...cfg.rules
453
+ };
454
+ }
455
+ if (cfg.plugins) {
456
+ outputConfig.plugins = {
457
+ ...outputConfig.plugins,
458
+ ...cfg.plugins
459
+ };
460
+ }
461
+ if (cfg.name) {
462
+ outputConfig.name = cfg.name;
463
+ }
464
+ if (cfg.basePath) {
465
+ outputConfig.basePath = cfg.basePath;
466
+ }
467
+ if (cfg.files) {
468
+ outputConfig.files = cfg.files;
469
+ }
470
+ if (cfg.ignores) {
471
+ outputConfig.ignores = cfg.ignores;
472
+ }
473
+ if (cfg.language) {
474
+ outputConfig.language = cfg.language;
475
+ }
476
+ if (cfg.languageOptions) {
477
+ outputConfig.languageOptions = cfg.languageOptions;
478
+ }
479
+ if (cfg.linterOptions) {
480
+ outputConfig.linterOptions = cfg.linterOptions;
481
+ }
482
+ if (cfg.processor) {
483
+ outputConfig.processor = cfg.processor;
435
484
  }
436
- outputConfig = index.configs[cfg.config];
437
- }
438
- if (cfg?.rules) {
439
- outputConfig.rules = cfg.rules;
440
485
  }
441
486
  outputConfig.settings = {
442
487
  jsdoc: cfg?.mergeSettings === false ? cfg.settings : (0, _objectDeepMerge.merge)({}, cfg?.settings ?? {}, cfg?.config?.includes('recommended') ? {