eslint-plugin-jsdoc 54.7.0 → 55.0.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
@@ -12,7 +12,8 @@ JSDoc linting rules for ESLint.
12
12
  * [eslint-plugin-jsdoc](#user-content-eslint-plugin-jsdoc)
13
13
  * [Installation](#user-content-eslint-plugin-jsdoc-installation)
14
14
  * [Configuration](#user-content-eslint-plugin-jsdoc-configuration)
15
- * [Flat config](#user-content-eslint-plugin-jsdoc-configuration-flat-config)
15
+ * [Flat config (procedural)](#user-content-eslint-plugin-jsdoc-configuration-flat-config-procedural)
16
+ * [Flat config (declarative)](#user-content-eslint-plugin-jsdoc-configuration-flat-config-declarative)
16
17
  * [`eslintrc`](#user-content-eslint-plugin-jsdoc-configuration-eslintrc)
17
18
  * [Options](#user-content-eslint-plugin-jsdoc-options)
18
19
  * [Settings](#user-content-eslint-plugin-jsdoc-settings)
@@ -43,9 +44,73 @@ npm install --save-dev eslint-plugin-jsdoc
43
44
  <a name="eslint-plugin-jsdoc-configuration"></a>
44
45
  ## Configuration
45
46
 
46
- <a name="user-content-eslint-plugin-jsdoc-configuration-flat-config"></a>
47
- <a name="eslint-plugin-jsdoc-configuration-flat-config"></a>
48
- ### Flat config
47
+ <a name="user-content-eslint-plugin-jsdoc-configuration-flat-config-procedural"></a>
48
+ <a name="eslint-plugin-jsdoc-configuration-flat-config-procedural"></a>
49
+ ### Flat config (procedural)
50
+
51
+ This is the currently recommended approach.
52
+
53
+ ```js
54
+ import {jsdoc} from 'eslint-plugin-jsdoc';
55
+
56
+ export default [
57
+ ...jsdoc({
58
+ config: 'flat/recommended',
59
+ })
60
+ ];
61
+ ```
62
+
63
+ Or with settings supplied:
64
+
65
+ ```js
66
+ import {jsdoc} from 'eslint-plugin-jsdoc';
67
+
68
+ export default [
69
+ ...jsdoc({
70
+ config: 'flat/recommended',
71
+ // Uncomment this if you wish your `settings` to overwrite the config's own settings;
72
+ // otherwise, the default behavior is to merge recursively
73
+ // mergeSettings: false,
74
+ settings: {
75
+ // Do not add a `jsdoc` child object here as you would for regular ESLint `settings`
76
+ structuredTags: {
77
+ see: {
78
+ name: 'namepath-referencing',
79
+ required: [
80
+ 'name',
81
+ ],
82
+ },
83
+ },
84
+ /*
85
+ // Since the recommended config has been chosen, the above settings will
86
+ // be merged by default with the following (which are tags that are
87
+ // being allowed and requiring a type):
88
+ structuredTags: {
89
+ next: {
90
+ required: [
91
+ 'type',
92
+ ],
93
+ },
94
+ throws: {
95
+ required: [
96
+ 'type',
97
+ ],
98
+ },
99
+ yields: {
100
+ required: [
101
+ 'type',
102
+ ],
103
+ },
104
+ },
105
+ */
106
+ }
107
+ })
108
+ ];
109
+ ```
110
+
111
+ <a name="user-content-eslint-plugin-jsdoc-configuration-flat-config-declarative"></a>
112
+ <a name="eslint-plugin-jsdoc-configuration-flat-config-declarative"></a>
113
+ ### Flat config (declarative)
49
114
 
50
115
  ```js
51
116
  import jsdoc from 'eslint-plugin-jsdoc';
@@ -56,6 +121,7 @@ const config = [
56
121
  // other configuration objects...
57
122
  {
58
123
  files: ['**/*.js'],
124
+ // `plugins` here is not necessary if including the above config
59
125
  plugins: {
60
126
  jsdoc,
61
127
  },
@@ -77,8 +143,8 @@ The general starting rulesets you can extend from in flat config are:
77
143
  - `jsdoc.configs['flat/recommended-typescript-flavor']`: A similar recommended starting list, adjusted for projects using JavaScript syntax (source files that are still `.js`) but using TypeScript flavor within JSDoc (i.e., the default "typescript" `mode` in `eslint-plugin-jsdoc`)
78
144
  - `jsdoc.configs['flat/recommended-typescript-flavor-error']`: The same, reporting with failing errors instead of mere warnings
79
145
 
80
- <a name="user-content-eslint-plugin-jsdoc-configuration-flat-config-granular-flat-configs"></a>
81
- <a name="eslint-plugin-jsdoc-configuration-flat-config-granular-flat-configs"></a>
146
+ <a name="user-content-eslint-plugin-jsdoc-configuration-flat-config-declarative-granular-flat-configs"></a>
147
+ <a name="eslint-plugin-jsdoc-configuration-flat-config-declarative-granular-flat-configs"></a>
82
148
  #### Granular Flat Configs
83
149
 
84
150
  There also exist several more granular, standalone TypeScript rulesets you can extend from.
@@ -94,7 +160,7 @@ These each only enable mostly or only rules from the recommended starting rules:
94
160
  - `jsdoc.configs['flat/logical-typescript-error']`: for TypeScript files, with reports set to error
95
161
  - `jsdoc.configs['flat/logical-typescript-flavor']`: for files using JavaScript syntax and JSDoc types, with reports set to warn
96
162
  - `jsdoc.configs['flat/logical-typescript-flavor-error']`: for files using JavaScript syntax and JSDoc types, with reports set to error
97
- - **Requirements**: rules that enforce tags exist
163
+ - **Requirements**: rules that enforce tags exist or have or don't have types
98
164
  - `jsdoc.configs['flat/requirements-typescript']`: for TypeScript files, with reports set to warn
99
165
  - `jsdoc.configs['flat/requirements-typescript-error']`: for TypeScript files, with reports set to error
100
166
  - `jsdoc.configs['flat/requirements-typescript-flavor']`: for files using JavaScript syntax and JSDoc types, with reports set to warn
@@ -117,8 +183,8 @@ export default [
117
183
  ];
118
184
  ```
119
185
 
120
- <a name="user-content-eslint-plugin-jsdoc-configuration-flat-config-granular-flat-configs-why-certain-rules-were-excluded-from-the-granular-configs"></a>
121
- <a name="eslint-plugin-jsdoc-configuration-flat-config-granular-flat-configs-why-certain-rules-were-excluded-from-the-granular-configs"></a>
186
+ <a name="user-content-eslint-plugin-jsdoc-configuration-flat-config-declarative-granular-flat-configs-why-certain-rules-were-excluded-from-the-granular-configs"></a>
187
+ <a name="eslint-plugin-jsdoc-configuration-flat-config-declarative-granular-flat-configs-why-certain-rules-were-excluded-from-the-granular-configs"></a>
122
188
  ##### Why certain rules were excluded from the granular configs
123
189
 
124
190
  A few rules were left out of the granular configs. Here is why:
@@ -221,7 +221,7 @@ export default iterateJsdoc(({
221
221
  await replaceInOrder({
222
222
  checkName: 'index rules',
223
223
  newLine: `${' '.repeat(4)}'${ruleName}': ${camelCasedRuleName},`,
224
- oldRegex: /\n\s{4}'(?<oldRule>[^']*)': [^,]*,/gv,
224
+ oldRegex: /\n\s{2}'(?<oldRule>[^']*)': [^,]*,/gv,
225
225
  path: './src/index.js'
226
226
  });
227
227
  await Promise.resolve().then(() => _interopRequireWildcard(require('./generateDocs.js')));
@@ -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{4}'(?<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,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BAAkBA,kBAAkB,OAAO;IAChFW,UAAU,EAAE,IAAI;IAChBC,QAAQ,EAAE,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.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,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,I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C,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":[]}
package/dist/index.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = void 0;
6
+ exports.jsdoc = exports.default = void 0;
7
7
  var _getJsdocProcessorPlugin = require("./getJsdocProcessorPlugin.cjs");
8
8
  var _checkAccess = _interopRequireDefault(require("./rules/checkAccess.cjs"));
9
9
  var _checkAlignment = _interopRequireDefault(require("./rules/checkAlignment.cjs"));
@@ -62,6 +62,7 @@ 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
64
  var _validTypes = _interopRequireDefault(require("./rules/validTypes.cjs"));
65
+ var _objectDeepMerge = require("object-deep-merge");
65
66
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
66
67
  /* eslint-disable jsdoc/valid-types -- Bug */
67
68
  /**
@@ -73,69 +74,67 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
73
74
  * import('eslint').Linter.Config>
74
75
  * }}
75
76
  */
76
- const index = {
77
- /* eslint-enable jsdoc/valid-types -- Bug */
78
- // @ts-expect-error Ok
79
- configs: {},
80
- rules: {
81
- 'check-access': _checkAccess.default,
82
- 'check-alignment': _checkAlignment.default,
83
- 'check-examples': _checkExamples.default,
84
- 'check-indentation': _checkIndentation.default,
85
- 'check-line-alignment': _checkLineAlignment.default,
86
- 'check-param-names': _checkParamNames.default,
87
- 'check-property-names': _checkPropertyNames.default,
88
- 'check-syntax': _checkSyntax.default,
89
- 'check-tag-names': _checkTagNames.default,
90
- 'check-template-names': _checkTemplateNames.default,
91
- 'check-types': _checkTypes.default,
92
- 'check-values': _checkValues.default,
93
- 'convert-to-jsdoc-comments': _convertToJsdocComments.default,
94
- 'empty-tags': _emptyTags.default,
95
- 'implements-on-classes': _implementsOnClasses.default,
96
- 'imports-as-dependencies': _importsAsDependencies.default,
97
- 'informative-docs': _informativeDocs.default,
98
- 'lines-before-block': _linesBeforeBlock.default,
99
- 'match-description': _matchDescription.default,
100
- 'match-name': _matchName.default,
101
- 'multiline-blocks': _multilineBlocks.default,
102
- 'no-bad-blocks': _noBadBlocks.default,
103
- 'no-blank-block-descriptions': _noBlankBlockDescriptions.default,
104
- 'no-blank-blocks': _noBlankBlocks.default,
105
- 'no-defaults': _noDefaults.default,
106
- 'no-missing-syntax': _noMissingSyntax.default,
107
- 'no-multi-asterisks': _noMultiAsterisks.default,
108
- 'no-restricted-syntax': _noRestrictedSyntax.default,
109
- 'no-types': _noTypes.default,
110
- 'no-undefined-types': _noUndefinedTypes.default,
111
- 'require-asterisk-prefix': _requireAsteriskPrefix.default,
112
- 'require-description': _requireDescription.default,
113
- 'require-description-complete-sentence': _requireDescriptionCompleteSentence.default,
114
- 'require-example': _requireExample.default,
115
- 'require-file-overview': _requireFileOverview.default,
116
- 'require-hyphen-before-param-description': _requireHyphenBeforeParamDescription.default,
117
- 'require-jsdoc': _requireJsdoc.default,
118
- 'require-param': _requireParam.default,
119
- 'require-param-description': _requireParamDescription.default,
120
- 'require-param-name': _requireParamName.default,
121
- 'require-param-type': _requireParamType.default,
122
- 'require-property': _requireProperty.default,
123
- 'require-property-description': _requirePropertyDescription.default,
124
- 'require-property-name': _requirePropertyName.default,
125
- 'require-property-type': _requirePropertyType.default,
126
- 'require-returns': _requireReturns.default,
127
- 'require-returns-check': _requireReturnsCheck.default,
128
- 'require-returns-description': _requireReturnsDescription.default,
129
- 'require-returns-type': _requireReturnsType.default,
130
- 'require-template': _requireTemplate.default,
131
- 'require-throws': _requireThrows.default,
132
- 'require-yields': _requireYields.default,
133
- 'require-yields-check': _requireYieldsCheck.default,
134
- 'sort-tags': _sortTags.default,
135
- 'tag-lines': _tagLines.default,
136
- 'text-escaping': _textEscaping.default,
137
- 'valid-types': _validTypes.default
138
- }
77
+ const index = {};
78
+ /* eslint-enable jsdoc/valid-types -- Bug */
79
+ index.configs = {};
80
+ index.rules = {
81
+ 'check-access': _checkAccess.default,
82
+ 'check-alignment': _checkAlignment.default,
83
+ 'check-examples': _checkExamples.default,
84
+ 'check-indentation': _checkIndentation.default,
85
+ 'check-line-alignment': _checkLineAlignment.default,
86
+ 'check-param-names': _checkParamNames.default,
87
+ 'check-property-names': _checkPropertyNames.default,
88
+ 'check-syntax': _checkSyntax.default,
89
+ 'check-tag-names': _checkTagNames.default,
90
+ 'check-template-names': _checkTemplateNames.default,
91
+ 'check-types': _checkTypes.default,
92
+ 'check-values': _checkValues.default,
93
+ 'convert-to-jsdoc-comments': _convertToJsdocComments.default,
94
+ 'empty-tags': _emptyTags.default,
95
+ 'implements-on-classes': _implementsOnClasses.default,
96
+ 'imports-as-dependencies': _importsAsDependencies.default,
97
+ 'informative-docs': _informativeDocs.default,
98
+ 'lines-before-block': _linesBeforeBlock.default,
99
+ 'match-description': _matchDescription.default,
100
+ 'match-name': _matchName.default,
101
+ 'multiline-blocks': _multilineBlocks.default,
102
+ 'no-bad-blocks': _noBadBlocks.default,
103
+ 'no-blank-block-descriptions': _noBlankBlockDescriptions.default,
104
+ 'no-blank-blocks': _noBlankBlocks.default,
105
+ 'no-defaults': _noDefaults.default,
106
+ 'no-missing-syntax': _noMissingSyntax.default,
107
+ 'no-multi-asterisks': _noMultiAsterisks.default,
108
+ 'no-restricted-syntax': _noRestrictedSyntax.default,
109
+ 'no-types': _noTypes.default,
110
+ 'no-undefined-types': _noUndefinedTypes.default,
111
+ 'require-asterisk-prefix': _requireAsteriskPrefix.default,
112
+ 'require-description': _requireDescription.default,
113
+ 'require-description-complete-sentence': _requireDescriptionCompleteSentence.default,
114
+ 'require-example': _requireExample.default,
115
+ 'require-file-overview': _requireFileOverview.default,
116
+ 'require-hyphen-before-param-description': _requireHyphenBeforeParamDescription.default,
117
+ 'require-jsdoc': _requireJsdoc.default,
118
+ 'require-param': _requireParam.default,
119
+ 'require-param-description': _requireParamDescription.default,
120
+ 'require-param-name': _requireParamName.default,
121
+ 'require-param-type': _requireParamType.default,
122
+ 'require-property': _requireProperty.default,
123
+ 'require-property-description': _requirePropertyDescription.default,
124
+ 'require-property-name': _requirePropertyName.default,
125
+ 'require-property-type': _requirePropertyType.default,
126
+ 'require-returns': _requireReturns.default,
127
+ 'require-returns-check': _requireReturnsCheck.default,
128
+ 'require-returns-description': _requireReturnsDescription.default,
129
+ 'require-returns-type': _requireReturnsType.default,
130
+ 'require-template': _requireTemplate.default,
131
+ 'require-throws': _requireThrows.default,
132
+ 'require-yields': _requireYields.default,
133
+ 'require-yields-check': _requireYieldsCheck.default,
134
+ 'sort-tags': _sortTags.default,
135
+ 'tag-lines': _tagLines.default,
136
+ 'text-escaping': _textEscaping.default,
137
+ 'valid-types': _validTypes.default
139
138
  };
140
139
 
141
140
  /**
@@ -406,6 +405,55 @@ index.configs['examples-and-default-expressions'] = /** @type {import('eslint').
406
405
  plugins: {}
407
406
  };
408
407
  })];
408
+
409
+ /* eslint-disable jsdoc/valid-types -- Bug */
410
+ /**
411
+ * @type {((
412
+ * cfg?: {
413
+ * mergeSettings?: boolean,
414
+ * config?: `flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,
415
+ * settings?: Partial<import('./iterateJsdoc.js').Settings>
416
+ * }
417
+ * ) => import('eslint').Linter.Config) & import('eslint').ESLint.Plugin & {
418
+ * configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,
419
+ * import('eslint').Linter.Config>
420
+ * }}
421
+ */
422
+ /* eslint-enable jsdoc/valid-types -- Bug */
423
+ // @ts-expect-error Ok
424
+ const jsdoc = function (cfg) {
425
+ /** @type {import('eslint').Linter.Config} */
426
+ let outputConfig = {
427
+ plugins: {
428
+ jsdoc: index
429
+ }
430
+ };
431
+ if (cfg?.config) {
432
+ // @ts-expect-error Security check
433
+ if (cfg.config === '__proto__') {
434
+ throw new TypeError('Disallowed config value');
435
+ }
436
+ outputConfig = index.configs[cfg.config];
437
+ }
438
+ outputConfig.settings = {
439
+ jsdoc: cfg?.mergeSettings === false ? cfg.settings : (0, _objectDeepMerge.merge)({}, cfg?.settings ?? {}, cfg?.config?.includes('recommended') ? {
440
+ // We may need to drop these for "typescript" (non-"flavor") configs,
441
+ // if support is later added: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html
442
+ structuredTags: {
443
+ next: {
444
+ required: ['type']
445
+ },
446
+ throws: {
447
+ required: ['type']
448
+ },
449
+ yields: {
450
+ required: ['type']
451
+ }
452
+ }
453
+ } : {})
454
+ };
455
+ return outputConfig;
456
+ };
457
+ exports.jsdoc = jsdoc;
409
458
  var _default = exports.default = index;
410
- module.exports = exports.default;
411
459
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.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.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 */\n // @ts-expect-error Ok\n configs: {},\n 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/**\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 Ok\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,GAAAf,sBAAA,CAAAF,OAAA;AACA,IAAAkB,gBAAA,GAAAhB,sBAAA,CAAAF,OAAA;AACA,IAAAmB,iBAAA,GAAAjB,sBAAA,CAAAF,OAAA;AACA,IAAAoB,iBAAA,GAAAlB,sBAAA,CAAAF,OAAA;AACA,IAAAqB,UAAA,GAAAnB,sBAAA,CAAAF,OAAA;AACA,IAAAsB,gBAAA,GAAApB,sBAAA,CAAAF,OAAA;AACA,IAA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,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","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","_objectDeepMerge","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","cfg","outputConfig","TypeError","settings","mergeSettings","merge","includes","structuredTags","next","required","throws","yields","exports","_default"],"sources":["../src/index.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';\nimport {\n merge,\n} from 'object-deep-merge';\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 Ok\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\n/* eslint-disable jsdoc/valid-types -- Bug */\n/**\n * @type {((\n * cfg?: {\n * mergeSettings?: boolean,\n * config?: `flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,\n * settings?: Partial<import('./iterateJsdoc.js').Settings>\n * }\n * ) => import('eslint').Linter.Config) & import('eslint').ESLint.Plugin & {\n * configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,\n * import('eslint').Linter.Config>\n * }}\n */\n/* eslint-enable jsdoc/valid-types -- Bug */\n// @ts-expect-error Ok\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 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 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,C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AAC,CACL;EACJ,CAAC;EAED,OAAOR,YAAY;AACrB,CAAC;AAACW,OAAA,CAAAlD,KAAA,GAAAA,KAAA;AAAA,IAAAmD,QAAA,GAAAD,OAAA,CAAApH,OAAA,GAEaC,KAAK","ignoreList":[]}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,22 @@
1
+ /**
2
+ * @type {((
3
+ * cfg?: {
4
+ * mergeSettings?: boolean,
5
+ * config?: `flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,
6
+ * settings?: Partial<import('./iterateJsdoc.js').Settings>
7
+ * }
8
+ * ) => import('eslint').Linter.Config) & import('eslint').ESLint.Plugin & {
9
+ * configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,
10
+ * import('eslint').Linter.Config>
11
+ * }}
12
+ */
13
+ export const jsdoc: ((cfg?: {
14
+ mergeSettings?: boolean;
15
+ config?: `flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`;
16
+ settings?: Partial<import("./iterateJsdoc.js").Settings>;
17
+ }) => import("eslint").Linter.Config) & import("eslint").ESLint.Plugin & {
18
+ configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`, import("eslint").Linter.Config>;
19
+ };
1
20
  export default index;
2
21
  export type ConfigGroups = "recommended" | "stylistic" | "contents" | "logical" | "requirements";
3
22
  export type ConfigVariants = "" | "-typescript" | "-typescript-flavor";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";2BA+Da,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,cAAc;6BACrE,EAAE,GAAG,aAAa,GAAG,oBAAoB;iCACzC,EAAE,GAAG,QAAQ;AAH1B;;;;;;;;GAQG;AACH,qBALU,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,GAAG;IACtC,OAAO,EAAE,MAAM,CAAC,QAAQ,YAAY,GAAG,cAAc,GAAG,kBAAkB,EAAE,EAChF,OAAW,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;CAChC,CAiEF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"AAmhBA;;;;;;;;;;;GAWG;AAGH,oBAbU,CAAC,CACN,GAAG,CAAC,EAAE;IACJ,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,QAAQ,YAAY,GAAG,cAAc,GAAG,kBAAkB,EAAE,CAAC;IACtE,QAAQ,CAAC,EAAE,OAAO,CAAC,OAAO,mBAAmB,EAAE,QAAQ,CAAC,CAAA;CACzD,KACE,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,GAAG;IACtE,OAAO,EAAE,MAAM,CAAC,QAAQ,YAAY,GAAG,cAAc,GAAG,kBAAkB,EAAE,EAChF,OAAW,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;CAChC,CAuDF;;2BAlhBW,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,cAAc;6BACrE,EAAE,GAAG,aAAa,GAAG,oBAAoB;iCACzC,EAAE,GAAG,QAAQ;AAH1B;;;;;;;;GAQG;AACH,qBALU,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,GAAG;IACtC,OAAO,EAAE,MAAM,CAAC,QAAQ,YAAY,GAAG,cAAc,GAAG,kBAAkB,EAAE,EAChF,OAAW,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;CAChC,CAEa"}
package/package.json CHANGED
@@ -12,6 +12,7 @@
12
12
  "escape-string-regexp": "^4.0.0",
13
13
  "espree": "^10.4.0",
14
14
  "esquery": "^1.6.0",
15
+ "object-deep-merge": "^1.0.5",
15
16
  "parse-imports-exports": "^0.2.4",
16
17
  "semver": "^7.7.2",
17
18
  "spdx-expression-parse": "^4.0.0"
@@ -21,7 +22,6 @@
21
22
  "@babel/cli": "^7.28.3",
22
23
  "@babel/core": "^7.28.4",
23
24
  "@babel/eslint-parser": "^7.28.4",
24
- "@babel/node": "^7.28.0",
25
25
  "@babel/plugin-syntax-class-properties": "^7.12.13",
26
26
  "@babel/plugin-transform-flow-strip-types": "^7.27.1",
27
27
  "@babel/preset-env": "^7.28.3",
@@ -37,7 +37,6 @@
37
37
  "@types/esquery": "^1.5.4",
38
38
  "@types/estree": "^1.0.8",
39
39
  "@types/json-schema": "^7.0.15",
40
- "@types/lodash.defaultsdeep": "^4.6.9",
41
40
  "@types/mocha": "^10.0.10",
42
41
  "@types/node": "^24.3.1",
43
42
  "@types/semver": "^7.7.1",
@@ -59,7 +58,6 @@
59
58
  "jsdoc-type-pratt-parser": "^5.1.1",
60
59
  "json-schema": "^0.4.0",
61
60
  "lint-staged": "^16.1.6",
62
- "lodash.defaultsdeep": "^4.6.1",
63
61
  "mocha": "^11.7.2",
64
62
  "open-editor": "^5.1.0",
65
63
  "replace": "^1.2.2",
@@ -140,9 +138,9 @@
140
138
  "tsc": "tsc",
141
139
  "tsc-build": "tsc -p tsconfig-prod.json",
142
140
  "build": "rimraf ./dist && NODE_ENV=production babel ./src --out-file-extension .cjs --out-dir ./dist --copy-files --source-maps --ignore ./src/bin/*.js --no-copy-ignored && replace 'require\\(\"\\.(.*?)\\.[^.]*?\"\\)' 'require(\".$1.cjs\")' 'dist' -r --include=\"*.cjs\" && pnpm tsc-build",
143
- "check-docs": "babel-node ./src/bin/generateDocs.js --check",
144
- "create-docs": "pnpm run create-options && babel-node ./src/bin/generateDocs.js",
145
- "create-rule": "babel-node ./src/bin/generateRule.js",
141
+ "check-docs": "node ./src/bin/generateDocs.js --check",
142
+ "create-docs": "pnpm run create-options && node ./src/bin/generateDocs.js",
143
+ "create-rule": "node ./src/bin/generateRule.js",
146
144
  "create-options": "node ./src/bin/generateOptions.js",
147
145
  "install-offline": "pnpm install --prefer-offline --no-audit",
148
146
  "lint": "eslint",
@@ -153,5 +151,5 @@
153
151
  "test-cov": "TIMING=1 c8 --reporter text pnpm run test-no-cov",
154
152
  "test-index": "pnpm run test-no-cov test/rules/index.js"
155
153
  },
156
- "version": "54.7.0"
154
+ "version": "55.0.0"
157
155
  }
package/src/index.js CHANGED
@@ -58,6 +58,9 @@ import sortTags from './rules/sortTags.js';
58
58
  import tagLines from './rules/tagLines.js';
59
59
  import textEscaping from './rules/textEscaping.js';
60
60
  import validTypes from './rules/validTypes.js';
61
+ import {
62
+ merge,
63
+ } from 'object-deep-merge';
61
64
 
62
65
  /* eslint-disable jsdoc/valid-types -- Bug */
63
66
  /**
@@ -69,69 +72,67 @@ import validTypes from './rules/validTypes.js';
69
72
  * import('eslint').Linter.Config>
70
73
  * }}
71
74
  */
72
- const index = {
73
- /* eslint-enable jsdoc/valid-types -- Bug */
74
- // @ts-expect-error Ok
75
- configs: {},
76
- rules: {
77
- 'check-access': checkAccess,
78
- 'check-alignment': checkAlignment,
79
- 'check-examples': checkExamples,
80
- 'check-indentation': checkIndentation,
81
- 'check-line-alignment': checkLineAlignment,
82
- 'check-param-names': checkParamNames,
83
- 'check-property-names': checkPropertyNames,
84
- 'check-syntax': checkSyntax,
85
- 'check-tag-names': checkTagNames,
86
- 'check-template-names': checkTemplateNames,
87
- 'check-types': checkTypes,
88
- 'check-values': checkValues,
89
- 'convert-to-jsdoc-comments': convertToJsdocComments,
90
- 'empty-tags': emptyTags,
91
- 'implements-on-classes': implementsOnClasses,
92
- 'imports-as-dependencies': importsAsDependencies,
93
- 'informative-docs': informativeDocs,
94
- 'lines-before-block': linesBeforeBlock,
95
- 'match-description': matchDescription,
96
- 'match-name': matchName,
97
- 'multiline-blocks': multilineBlocks,
98
- 'no-bad-blocks': noBadBlocks,
99
- 'no-blank-block-descriptions': noBlankBlockDescriptions,
100
- 'no-blank-blocks': noBlankBlocks,
101
- 'no-defaults': noDefaults,
102
- 'no-missing-syntax': noMissingSyntax,
103
- 'no-multi-asterisks': noMultiAsterisks,
104
- 'no-restricted-syntax': noRestrictedSyntax,
105
- 'no-types': noTypes,
106
- 'no-undefined-types': noUndefinedTypes,
107
- 'require-asterisk-prefix': requireAsteriskPrefix,
108
- 'require-description': requireDescription,
109
- 'require-description-complete-sentence': requireDescriptionCompleteSentence,
110
- 'require-example': requireExample,
111
- 'require-file-overview': requireFileOverview,
112
- 'require-hyphen-before-param-description': requireHyphenBeforeParamDescription,
113
- 'require-jsdoc': requireJsdoc,
114
- 'require-param': requireParam,
115
- 'require-param-description': requireParamDescription,
116
- 'require-param-name': requireParamName,
117
- 'require-param-type': requireParamType,
118
- 'require-property': requireProperty,
119
- 'require-property-description': requirePropertyDescription,
120
- 'require-property-name': requirePropertyName,
121
- 'require-property-type': requirePropertyType,
122
- 'require-returns': requireReturns,
123
- 'require-returns-check': requireReturnsCheck,
124
- 'require-returns-description': requireReturnsDescription,
125
- 'require-returns-type': requireReturnsType,
126
- 'require-template': requireTemplate,
127
- 'require-throws': requireThrows,
128
- 'require-yields': requireYields,
129
- 'require-yields-check': requireYieldsCheck,
130
- 'sort-tags': sortTags,
131
- 'tag-lines': tagLines,
132
- 'text-escaping': textEscaping,
133
- 'valid-types': validTypes,
134
- },
75
+ const index = {};
76
+ /* eslint-enable jsdoc/valid-types -- Bug */
77
+ index.configs = {};
78
+ index.rules = {
79
+ 'check-access': checkAccess,
80
+ 'check-alignment': checkAlignment,
81
+ 'check-examples': checkExamples,
82
+ 'check-indentation': checkIndentation,
83
+ 'check-line-alignment': checkLineAlignment,
84
+ 'check-param-names': checkParamNames,
85
+ 'check-property-names': checkPropertyNames,
86
+ 'check-syntax': checkSyntax,
87
+ 'check-tag-names': checkTagNames,
88
+ 'check-template-names': checkTemplateNames,
89
+ 'check-types': checkTypes,
90
+ 'check-values': checkValues,
91
+ 'convert-to-jsdoc-comments': convertToJsdocComments,
92
+ 'empty-tags': emptyTags,
93
+ 'implements-on-classes': implementsOnClasses,
94
+ 'imports-as-dependencies': importsAsDependencies,
95
+ 'informative-docs': informativeDocs,
96
+ 'lines-before-block': linesBeforeBlock,
97
+ 'match-description': matchDescription,
98
+ 'match-name': matchName,
99
+ 'multiline-blocks': multilineBlocks,
100
+ 'no-bad-blocks': noBadBlocks,
101
+ 'no-blank-block-descriptions': noBlankBlockDescriptions,
102
+ 'no-blank-blocks': noBlankBlocks,
103
+ 'no-defaults': noDefaults,
104
+ 'no-missing-syntax': noMissingSyntax,
105
+ 'no-multi-asterisks': noMultiAsterisks,
106
+ 'no-restricted-syntax': noRestrictedSyntax,
107
+ 'no-types': noTypes,
108
+ 'no-undefined-types': noUndefinedTypes,
109
+ 'require-asterisk-prefix': requireAsteriskPrefix,
110
+ 'require-description': requireDescription,
111
+ 'require-description-complete-sentence': requireDescriptionCompleteSentence,
112
+ 'require-example': requireExample,
113
+ 'require-file-overview': requireFileOverview,
114
+ 'require-hyphen-before-param-description': requireHyphenBeforeParamDescription,
115
+ 'require-jsdoc': requireJsdoc,
116
+ 'require-param': requireParam,
117
+ 'require-param-description': requireParamDescription,
118
+ 'require-param-name': requireParamName,
119
+ 'require-param-type': requireParamType,
120
+ 'require-property': requireProperty,
121
+ 'require-property-description': requirePropertyDescription,
122
+ 'require-property-name': requirePropertyName,
123
+ 'require-property-type': requirePropertyType,
124
+ 'require-returns': requireReturns,
125
+ 'require-returns-check': requireReturnsCheck,
126
+ 'require-returns-description': requireReturnsDescription,
127
+ 'require-returns-type': requireReturnsType,
128
+ 'require-template': requireTemplate,
129
+ 'require-throws': requireThrows,
130
+ 'require-yields': requireYields,
131
+ 'require-yields-check': requireYieldsCheck,
132
+ 'sort-tags': sortTags,
133
+ 'tag-lines': tagLines,
134
+ 'text-escaping': textEscaping,
135
+ 'valid-types': validTypes,
135
136
  };
136
137
 
137
138
  /**
@@ -527,4 +528,72 @@ index.configs['examples-and-default-expressions'] = /** @type {import('eslint').
527
528
  }),
528
529
  ]);
529
530
 
531
+ /* eslint-disable jsdoc/valid-types -- Bug */
532
+ /**
533
+ * @type {((
534
+ * cfg?: {
535
+ * mergeSettings?: boolean,
536
+ * config?: `flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,
537
+ * settings?: Partial<import('./iterateJsdoc.js').Settings>
538
+ * }
539
+ * ) => import('eslint').Linter.Config) & import('eslint').ESLint.Plugin & {
540
+ * configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,
541
+ * import('eslint').Linter.Config>
542
+ * }}
543
+ */
544
+ /* eslint-enable jsdoc/valid-types -- Bug */
545
+ // @ts-expect-error Ok
546
+ export const jsdoc = function (cfg) {
547
+ /** @type {import('eslint').Linter.Config} */
548
+ let outputConfig = {
549
+ plugins: {
550
+ jsdoc: index,
551
+ },
552
+ };
553
+ if (
554
+ cfg?.config
555
+ ) {
556
+ // @ts-expect-error Security check
557
+ if (cfg.config === '__proto__') {
558
+ throw new TypeError('Disallowed config value');
559
+ }
560
+
561
+ outputConfig = index.configs[cfg.config];
562
+ }
563
+
564
+ outputConfig.settings = {
565
+ jsdoc: cfg?.mergeSettings === false ?
566
+ cfg.settings :
567
+ merge(
568
+ {},
569
+ cfg?.settings ?? {},
570
+ cfg?.config?.includes('recommended') ?
571
+ {
572
+ // We may need to drop these for "typescript" (non-"flavor") configs,
573
+ // if support is later added: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html
574
+ structuredTags: {
575
+ next: {
576
+ required: [
577
+ 'type',
578
+ ],
579
+ },
580
+ throws: {
581
+ required: [
582
+ 'type',
583
+ ],
584
+ },
585
+ yields: {
586
+ required: [
587
+ 'type',
588
+ ],
589
+ },
590
+ },
591
+ } :
592
+ {},
593
+ ),
594
+ };
595
+
596
+ return outputConfig;
597
+ };
598
+
530
599
  export default index;