eslint-plugin-jsdoc 54.3.0 → 54.4.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.
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ var _escodegen = require("@es-joy/escodegen");
4
+ var _decamelize = _interopRequireDefault(require("decamelize"));
5
+ var _espree = require("espree");
6
+ var _esquery = _interopRequireDefault(require("esquery"));
7
+ var _promises = require("fs/promises");
8
+ var _path = require("path");
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ const rulesDir = './src/rules';
11
+ const dirContents = await (0, _promises.readdir)(rulesDir);
12
+ for (const file of dirContents) {
13
+ if (!file.endsWith('.js')) {
14
+ continue;
15
+ }
16
+ const fileContents = await (0, _promises.readFile)((0, _path.join)(rulesDir, file), 'utf8');
17
+ // console.log('file', file);
18
+ const ast = (0, _espree.parse)(fileContents, {
19
+ ecmaVersion: 2_024,
20
+ sourceType: 'module'
21
+ });
22
+ const results = _esquery.default.query(ast, 'ExportDefaultDeclaration[declaration.callee.name="iterateJsdoc"]' + ' Property[key.name="meta"] Property[key.name="schema"]');
23
+ if (results[0]?.value) {
24
+ const schema = (0, _escodegen.generate)(results[0]?.value);
25
+
26
+ // eslint-disable-next-line no-eval -- Need some parser
27
+ const json = eval('JSON.stringify(' + schema + ', null, 2)');
28
+ const parsed = JSON.parse(json);
29
+ let initial = '';
30
+ if (Array.isArray(parsed)) {
31
+ if (!parsed.length) {
32
+ // eslint-disable-next-line no-console -- CLI
33
+ console.log('skipping no options', file);
34
+ continue;
35
+ }
36
+ if (parsed.length >= 2) {
37
+ if (parsed.length >= 3 || parsed[0].type !== 'string') {
38
+ // eslint-disable-next-line no-console -- CLI
39
+ console.log('unexpectedly large schema', file);
40
+ continue;
41
+ // throw new Error('Unexpected long schema array');
42
+ }
43
+ initial = `string (${parsed[0].enum.map(item => {
44
+ return `"${item}"`;
45
+ }).join(', ')}) followed by object with `;
46
+ parsed.shift();
47
+ }
48
+ }
49
+ const obj = Array.isArray(parsed) ? parsed[0] : parsed;
50
+ const hyphenatedRule = (0, _decamelize.default)(file, {
51
+ separator: '-'
52
+ }).replace(/\.js$/v, '.md');
53
+ const docPath = (0, _path.join)('.README/rules', hyphenatedRule);
54
+ const ruleDocs = (await (0, _promises.readFile)(docPath, 'utf8')).replace(/(\|\s*Options\s*\|)([^\|]*)(\|)?/v, `$1${initial + Object.keys(obj.properties).map(key => {
55
+ return `\`${key}\``;
56
+ }).join(', ')}$3`);
57
+ await (0, _promises.writeFile)(docPath, ruleDocs);
58
+ }
59
+ }
60
+ //# sourceMappingURL=generateOptions.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateOptions.cjs","names":["_escodegen","require","_decamelize","_interopRequireDefault","_espree","_esquery","_promises","_path","e","__esModule","default","rulesDir","dirContents","readdir","file","endsWith","fileContents","readFile","join","ast","parse","ecmaVersion","sourceType","results","esquery","query","value","schema","generate","json","eval","parsed","JSON","initial","Array","isArray","length","console","log","type","enum","map","item","shift","obj","hyphenatedRule","decamelize","separator","replace","docPath","ruleDocs","Object","keys","properties","key","writeFile"],"sources":["../src/bin/generateOptions.js"],"sourcesContent":["import {\n generate,\n} from '@es-joy/escodegen';\nimport decamelize from 'decamelize';\nimport {\n parse,\n} from 'espree';\nimport esquery from 'esquery';\nimport {\n readdir,\n readFile,\n writeFile,\n} from 'fs/promises';\nimport {\n join,\n} from 'path';\n\nconst rulesDir = './src/rules';\n\nconst dirContents = await readdir(rulesDir);\n\nfor (const file of dirContents) {\n if (!file.endsWith('.js')) {\n continue;\n }\n\n const fileContents = await readFile(join(rulesDir, file), 'utf8');\n // console.log('file', file);\n const ast = parse(fileContents, {\n ecmaVersion: 2_024,\n sourceType: 'module',\n });\n const results = esquery.query(\n ast,\n 'ExportDefaultDeclaration[declaration.callee.name=\"iterateJsdoc\"]' +\n ' Property[key.name=\"meta\"] Property[key.name=\"schema\"]',\n );\n if (results[0]?.value) {\n const schema = generate(results[0]?.value);\n\n // eslint-disable-next-line no-eval -- Need some parser\n const json = eval('JSON.stringify(' + schema + ', null, 2)');\n const parsed = JSON.parse(json);\n\n let initial = '';\n if (Array.isArray(parsed)) {\n if (!parsed.length) {\n // eslint-disable-next-line no-console -- CLI\n console.log('skipping no options', file);\n continue;\n }\n\n if (parsed.length >= 2) {\n if (parsed.length >= 3 || parsed[0].type !== 'string') {\n // eslint-disable-next-line no-console -- CLI\n console.log('unexpectedly large schema', file);\n continue;\n // throw new Error('Unexpected long schema array');\n }\n\n initial = `string (${parsed[0].enum.map((item) => {\n return `\"${item}\"`;\n }).join(', ')}) followed by object with `;\n parsed.shift();\n }\n }\n\n const obj = Array.isArray(parsed) ? parsed[0] : parsed;\n\n const hyphenatedRule = decamelize(file, {\n separator: '-',\n }).replace(/\\.js$/v, '.md');\n const docPath = join('.README/rules', hyphenatedRule);\n\n const ruleDocs = (await readFile(docPath, 'utf8'))\n .replace(/(\\|\\s*Options\\s*\\|)([^\\|]*)(\\|)?/v, `$1${\n initial +\n Object.keys(obj.properties).map((key) => {\n return `\\`${key}\\``;\n }).join(', ')\n }$3`);\n\n await writeFile(docPath, ruleDocs);\n }\n}\n"],"mappings":";;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAGA,IAAAI,QAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAKA,IAAAM,KAAA,GAAAN,OAAA;AAEc,SAAAE,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEd,MAAMG,QAAQ,GAAG,aAAa;AAE9B,MAAMC,WAAW,GAAG,MAAM,IAAAC,iBAAO,EAACF,QAAQ,CAAC;AAE3C,KAAK,MAAMG,IAAI,IAAIF,WAAW,EAAE;EAC9B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UAChD,OAAO,IAAIA,IAAI,GAAG;QACpB,CAAC,CAAC,CAACxB,IAAI,CAAC,IAAI,CAAC,4BAA4B;QACzCa,MAAM,CAACY,KAAK,CAAC,CAAC;MAChB;IACF;IAEA,MAAMC,GAAG,GAAGV,KAAK,CAACC,OAAO,CAACJ,MAAM,CAAC,GAAGA,MAAM,CAAC,CAAC,CAAC,GAAGA,MAAM;IAEtD,MAAMc,cAAc,GAAG,IAAAC,mBAAU,EAAChC,IAAI,EAAE;MACtCiC,SAAS,EAAE;IACb,CAAC,CAAC,CAACC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC;IAC3B,MAAMC,OAAO,GAAG,IAAA/B,UAAI,EAAC,eAAe,EAAE2B,cAAc,CAAC;IAErD,MAAMK,QAAQ,GAAG,CAAC,MAAM,IAAAjC,kBAAQ,EAACgC,OAAO,EAAE,MAAM,CAAC,EAC9CD,OAAO,CAAC,mCAAmC,EAAE,KAC5Cf,OAAO,GACPkB,MAAM,CAACC,IAAI,CAACR,GAAG,CAACS,UAAU,CAAC,CAACZ,GAAG,CAAEa,GAAG,IAAK;MACvC,OAAO,KAAKA,GAAG,IAAI;IACrB,CAAC,CAAC,CAACpC,IAAI,CAAC,IAAI,CAAC,IACX,CAAC;IAEP,MAAM,IAAAqC,mBAAS,EAACN,OAAO,EAAEC,QAAQ,CAAC;EACpC;AACF","ignoreList":[]}
package/dist/index.cjs CHANGED
@@ -141,7 +141,7 @@ const index = {
141
141
  /**
142
142
  * @param {"warn"|"error"} warnOrError
143
143
  * @param {string} [flatName]
144
- * @returns {import('eslint').Linter.FlatConfig}
144
+ * @returns {import('eslint').Linter.Config}
145
145
  */
146
146
  const createRecommendedRuleset = (warnOrError, flatName) => {
147
147
  return {
@@ -217,7 +217,7 @@ const createRecommendedRuleset = (warnOrError, flatName) => {
217
217
  /**
218
218
  * @param {"warn"|"error"} warnOrError
219
219
  * @param {string} [flatName]
220
- * @returns {import('eslint').Linter.FlatConfig}
220
+ * @returns {import('eslint').Linter.Config}
221
221
  */
222
222
  const createRecommendedTypeScriptRuleset = (warnOrError, flatName) => {
223
223
  const ruleset = createRecommendedRuleset(warnOrError, flatName);
@@ -242,7 +242,7 @@ const createRecommendedTypeScriptRuleset = (warnOrError, flatName) => {
242
242
  /**
243
243
  * @param {"warn"|"error"} warnOrError
244
244
  * @param {string} [flatName]
245
- * @returns {import('eslint').Linter.FlatConfig}
245
+ * @returns {import('eslint').Linter.Config}
246
246
  */
247
247
  const createRecommendedTypeScriptFlavorRuleset = (warnOrError, flatName) => {
248
248
  const ruleset = createRecommendedRuleset(warnOrError, flatName);
@@ -264,7 +264,7 @@ const createStandaloneRulesetFactory = ruleNames => {
264
264
  /**
265
265
  * @param {"warn"|"error"} warnOrError
266
266
  * @param {string} [flatName]
267
- * @returns {import('eslint').Linter.FlatConfig}
267
+ * @returns {import('eslint').Linter.Config}
268
268
  */
269
269
  return (warnOrError, flatName) => {
270
270
  return {
@@ -325,7 +325,7 @@ index.configs['flat/stylistic-typescript'] = createStylisticTypeScriptRuleset('w
325
325
  index.configs['flat/stylistic-typescript-error'] = createStylisticTypeScriptRuleset('error', 'flat/stylistic-typescript-error');
326
326
  index.configs['flat/stylistic-typescript-flavor'] = createStylisticTypeScriptFlavorRuleset('warn', 'flat/stylistic-typescript-flavor');
327
327
  index.configs['flat/stylistic-typescript-flavor-error'] = createStylisticTypeScriptFlavorRuleset('error', 'flat/stylistic-typescript-error-flavor');
328
- index.configs.examples = /** @type {import('eslint').Linter.FlatConfig[]} */[{
328
+ index.configs.examples = /** @type {import('eslint').Linter.Config[]} */[{
329
329
  files: ['**/*.js'],
330
330
  name: 'jsdoc/examples/processor',
331
331
  plugins: {
@@ -361,7 +361,7 @@ index.configs.examples = /** @type {import('eslint').Linter.FlatConfig[]} */[{
361
361
  'padded-blocks': 0
362
362
  }
363
363
  }];
364
- index.configs['default-expressions'] = /** @type {import('eslint').Linter.FlatConfig[]} */[{
364
+ index.configs['default-expressions'] = /** @type {import('eslint').Linter.Config[]} */[{
365
365
  files: ['**/*.js'],
366
366
  name: 'jsdoc/default-expressions/processor',
367
367
  plugins: {
@@ -386,7 +386,7 @@ index.configs['default-expressions'] = /** @type {import('eslint').Linter.FlatCo
386
386
  strict: 0
387
387
  }
388
388
  }];
389
- index.configs['examples-and-default-expressions'] = /** @type {import('eslint').Linter.FlatConfig[]} */[{
389
+ index.configs['examples-and-default-expressions'] = /** @type {import('eslint').Linter.Config[]} */[{
390
390
  name: 'jsdoc/examples-and-default-expressions',
391
391
  plugins: {
392
392
  examples: (0, _getJsdocProcessorPlugin.getJsdocProcessorPlugin)({
@@ -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.FlatConfig}\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.FlatConfig}\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.FlatConfig}\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.FlatConfig}\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.FlatConfig[]} */ ([\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.FlatConfig[]} */ ([\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.FlatConfig[]} */ ([\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,G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,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","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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AO,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":[]}
@@ -6,40 +6,46 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.cjs"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
- /**
10
- * @param {string} string
11
- * @returns {string}
12
- */
13
- const trimStart = string => {
14
- return string.replace(/^\s+/v, '');
15
- };
16
9
  var _default = exports.default = (0, _iterateJsdoc.default)(({
10
+ context,
17
11
  indent,
18
12
  jsdocNode,
19
13
  report,
20
14
  sourceCode
21
15
  }) => {
16
+ const {
17
+ innerIndent = 1
18
+ } = context.options[0] || {};
19
+
22
20
  // `indent` is whitespace from line 1 (`/**`), so slice and account for "/".
23
- const indentLevel = indent.length + 1;
24
- const sourceLines = sourceCode.getText(jsdocNode).split('\n').slice(1).map(line => {
25
- return line.split('*')[0];
26
- }).filter(line => {
27
- return !trimStart(line).length;
21
+ const indentLevel = indent.length + innerIndent;
22
+ const sourceLines = sourceCode.getText(jsdocNode).split('\n').slice(1).map((line, number) => {
23
+ return {
24
+ line: line.split('*')[0],
25
+ number
26
+ };
27
+ }).filter(({
28
+ line
29
+ }) => {
30
+ return !line.trimStart().length;
28
31
  });
29
32
 
30
33
  /** @type {import('eslint').Rule.ReportFixer} */
31
34
  const fix = fixer => {
32
35
  const replacement = sourceCode.getText(jsdocNode).split('\n').map((line, index) => {
33
36
  // Ignore the first line and all lines not starting with `*`
34
- const ignored = !index || trimStart(line.split('*')[0]).length;
35
- return ignored ? line : `${indent} ${trimStart(line)}`;
37
+ const ignored = !index || line.split('*')[0].trimStart().length;
38
+ return ignored ? line : `${indent}${''.padStart(innerIndent, ' ')}${line.trimStart()}`;
36
39
  }).join('\n');
37
40
  return fixer.replaceText(jsdocNode, replacement);
38
41
  };
39
- sourceLines.some((line, lineNum) => {
42
+ sourceLines.some(({
43
+ line,
44
+ number
45
+ }) => {
40
46
  if (line.length !== indentLevel) {
41
47
  report('Expected JSDoc block to be aligned.', fix, {
42
- line: lineNum + 1
48
+ line: number + 1
43
49
  });
44
50
  return true;
45
51
  }
@@ -53,6 +59,15 @@ var _default = exports.default = (0, _iterateJsdoc.default)(({
53
59
  url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header'
54
60
  },
55
61
  fixable: 'code',
62
+ schema: [{
63
+ additionalProperties: false,
64
+ properties: {
65
+ innerIndent: {
66
+ default: 1,
67
+ type: 'integer'
68
+ }
69
+ }
70
+ }],
56
71
  type: 'layout'
57
72
  }
58
73
  });
@@ -1 +1 @@
1
- {"version":3,"file":"checkAlignment.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","trimStart","string","replace","_default","exports","iterateJsdoc","indent","jsdocNode","report","sourceCode","indentLevel","length","sourceLines","getText","split","slice","map","line","filter","fix","fixer","replacement","index","ignored","join","replaceText","some","lineNum","iterateAllJsdocs","meta","docs","description","url","fixable","type","module"],"sources":["../../src/rules/checkAlignment.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\n/**\n * @param {string} string\n * @returns {string}\n */\nconst trimStart = (string) => {\n return string.replace(/^\\s+/v, '');\n};\n\nexport default iterateJsdoc(({\n indent,\n jsdocNode,\n report,\n sourceCode,\n}) => {\n // `indent` is whitespace from line 1 (`/**`), so slice and account for \"/\".\n const indentLevel = indent.length + 1;\n const sourceLines = sourceCode.getText(jsdocNode).split('\\n')\n .slice(1)\n .map((line) => {\n return line.split('*')[0];\n })\n .filter((line) => {\n return !trimStart(line).length;\n });\n\n /** @type {import('eslint').Rule.ReportFixer} */\n const fix = (fixer) => {\n const replacement = sourceCode.getText(jsdocNode).split('\\n')\n .map((line, index) => {\n // Ignore the first line and all lines not starting with `*`\n const ignored = !index || trimStart(line.split('*')[0]).length;\n\n return ignored ? line : `${indent} ${trimStart(line)}`;\n })\n .join('\\n');\n\n return fixer.replaceText(jsdocNode, replacement);\n };\n\n sourceLines.some((line, lineNum) => {\n if (line.length !== indentLevel) {\n report('Expected JSDoc block to be aligned.', fix, {\n line: lineNum + 1,\n });\n\n return true;\n }\n\n return false;\n });\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Reports invalid alignment of JSDoc block asterisks.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header',\n },\n fixable: 'code',\n type: 'layout',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9C;AACA;AACA;AACA;AACA,MAAMG,SAAS,GAAIC,MAAM,IAAK;EAC5B,OAAOA,MAAM,CAACC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;AACpC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAL,OAAA,GAEa,IAAAM,qBAAY,EAAC,CAAC;EAC3BC,MAAM;EACNC,SAAS;EACTC,MAAM;EACNC;AACF,CAAC,KAAK;EACJ;EACA,MAAMC,WAAW,GAAGJ,MAAM,CAACK,MAAM,GAAG,CAAC;EACrC,MAAMC,WAAW,GAAGH,UAAU,CAACI,OAAO,CAACN,SAAS,CAAC,CAACO,KAAK,CAAC,IAAI,CAAC,CAC1DC,KAAK,CAAC,CAAC,CAAC,CACRC,GAAG,CAAEC,IAAI,IAAK;IACb,OAAOA,IAAI,CAACH,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;EAC3B,CAAC,CAAC,CACDI,MAAM,CAAED,IAAI,IAAK;IAChB,OAAO,CAACjB,SAAS,CAACiB,IAAI,CAAC,CAACN,MAAM;EAChC,CAAC,CAAC;;EAEJ;EACA,MAAMQ,GAAG,GAAIC,KAAK,IAAK;IACrB,MAAMC,WAAW,GAAGZ,UAAU,CAACI,OAAO,CAACN,SAAS,CAAC,CAACO,KAAK,CAAC,IAAI,CAAC,CAC1DE,GAAG,CAAC,CAACC,IAAI,EAAEK,KAAK,KAAK;MACpB;MACA,MAAMC,OAAO,GAAG,CAACD,KAAK,IAAItB,SAAS,CAACiB,IAAI,CAACH,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAACH,MAAM;MAE9D,OAAOY,OAAO,GAAGN,IAAI,GAAG,GAAGX,MAAM,IAAIN,SAAS,CAACiB,IAAI,CAAC,EAAE;IACxD,CAAC,CAAC,CACDO,IAAI,CAAC,IAAI,CAAC;IAEb,OAAOJ,KAAK,CAACK,WAAW,CAAClB,SAAS,EAAEc,WAAW,CAAC;EAClD,CAAC;EAEDT,WAAW,CAACc,IAAI,CAAC,CAACT,IAAI,EAAEU,OAAO,KAAK;IAClC,IAAIV,IAAI,CAACN,MAAM,KAAKD,WAAW,EAAE;MAC/BF,MAAM,CAAC,qCAAqC,EAAEW,GAAG,EAAE;QACjDF,IAAI,EAAEU,OAAO,GAAG;MAClB,CAAC,CAAC;MAEF,OAAO,IAAI;IACb;IAEA,OAAO,KAAK;EACd,CAAC,CAAC;AACJ,CAAC,EAAE;EACDC,gBAAgB,EAAE,IAAI;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,qDAAqD;MAClEC,GAAG,EAAE;IACP,CAAC;IACDC,OAAO,EAAE,MAAM;IACfC,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAC,MAAA,CAAA/B,OAAA,GAAAA,OAAA,CAAAL,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"checkAlignment.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","_default","exports","iterateJsdoc","context","indent","jsdocNode","report","sourceCode","innerIndent","options","indentLevel","length","sourceLines","getText","split","slice","map","line","number","filter","trimStart","fix","fixer","replacement","index","ignored","padStart","join","replaceText","some","iterateAllJsdocs","meta","docs","description","url","fixable","schema","additionalProperties","properties","type","module"],"sources":["../../src/rules/checkAlignment.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\nexport default iterateJsdoc(({\n context,\n indent,\n jsdocNode,\n report,\n sourceCode,\n}) => {\n const {\n innerIndent = 1,\n } = context.options[0] || {};\n\n // `indent` is whitespace from line 1 (`/**`), so slice and account for \"/\".\n const indentLevel = indent.length + innerIndent;\n const sourceLines = sourceCode.getText(jsdocNode).split('\\n')\n .slice(1)\n .map((line, number) => {\n return {\n line: line.split('*')[0],\n number,\n };\n })\n .filter(({\n line,\n }) => {\n return !line.trimStart().length;\n });\n\n /** @type {import('eslint').Rule.ReportFixer} */\n const fix = (fixer) => {\n const replacement = sourceCode.getText(jsdocNode).split('\\n')\n .map((line, index) => {\n // Ignore the first line and all lines not starting with `*`\n const ignored = !index || line.split('*')[0].trimStart().length;\n\n return ignored ? line : `${indent}${''.padStart(innerIndent, ' ')}${line.trimStart()}`;\n })\n .join('\\n');\n\n return fixer.replaceText(jsdocNode, replacement);\n };\n\n sourceLines.some(({\n line,\n number,\n }) => {\n if (line.length !== indentLevel) {\n report('Expected JSDoc block to be aligned.', fix, {\n line: number + 1,\n });\n\n return true;\n }\n\n return false;\n });\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Reports invalid alignment of JSDoc block asterisks.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header',\n },\n fixable: 'code',\n schema: [\n {\n additionalProperties: false,\n properties: {\n innerIndent: {\n default: 1,\n type: 'integer',\n },\n },\n },\n ],\n type: 'layout',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,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CAACsB,QAAQ,CAAClB,WAAW,EAAE,GAAG,CAAC,GAAGS,IAAI,CAACG,SAAS,CAAC,CAAC,EAAE;IACxF,CAAC,CAAC,CACDO,IAAI,CAAC,IAAI,CAAC;IAEb,OAAOL,KAAK,CAACM,WAAW,CAACvB,SAAS,EAAEkB,WAAW,CAAC;EAClD,CAAC;EAEDX,WAAW,CAACiB,IAAI,CAAC,CAAC;IAChBZ,IAAI;IACJC;EACF,CAAC,KAAK;IACJ,IAAID,IAAI,CAACN,MAAM,KAAKD,WAAW,EAAE;MAC/BJ,MAAM,CAAC,qCAAqC,EAAEe,GAAG,EAAE;QACjDJ,IAAI,EAAEC,MAAM,GAAG;MACjB,CAAC,CAAC;MAEF,OAAO,IAAI;IACb;IAEA,OAAO,KAAK;EACd,CAAC,CAAC;AACJ,CAAC,EAAE;EACDY,gBAAgB,EAAE,IAAI;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,qDAAqD;MAClEC,GAAG,EAAE;IACP,CAAC;IACDC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,CACN;MACEC,oBAAoB,EAAE,KAAK;MAC3BC,UAAU,EAAE;QACV9B,WAAW,EAAE;UACXT,OAAO,EAAE,CAAC;UACVwC,IAAI,EAAE;QACR;MACF;IACF,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAC,MAAA,CAAAvC,OAAA,GAAAA,OAAA,CAAAF,OAAA","ignoreList":[]}
@@ -59,10 +59,7 @@ var _default = exports.default = (0, _iterateJsdoc.default)(({
59
59
  };
60
60
  const checkTemplateTags = () => {
61
61
  for (const tag of templateTags) {
62
- const {
63
- name
64
- } = tag;
65
- const names = name.split(/,\s*/v);
62
+ const names = utils.parseClosureTemplateTag(tag);
66
63
  for (const nme of names) {
67
64
  if (!usedNames.has(nme)) {
68
65
  report(`@template ${nme} not in use`, null, tag);
@@ -1 +1 @@
1
- {"version":3,"file":"checkTemplateNames.cjs","names":["_iterateJsdoc","_interopRequireWildcard","require","_jsdocUtils","_jsdoccomment","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_default","exports","iterateJsdoc","jsdoc","node","report","settings","sourceCode","utils","mode","templateTags","getTags","usedNames","Set","checkForUsedTypes","potentialType","parsedType","tryParseType","parseType","traverse","nde","type","value","add","checkParamsAndReturnsTags","jsdc","paramName","getPreferredTagName","tagName","paramTags","paramTag","returnsName","returnsTags","returnsTag","checkTemplateTags","tag","name","names","split","nme","checkParameters","aliasDeclaration","checkParamsAndReturns","params","typeParameters","body","commentNode","getJSDocComment","innerJsdoc","parseComment","typeName","typeTags","typeTag","handleTypeAliases","declaration","callbackTags","functionTags","length","typedefTags","potentialTypedefType","propertyName","propertyTags","propertyTag","iterateAllJsdocs","meta","docs","description","url","schema","module"],"sources":["../../src/rules/checkTemplateNames.js"],"sourcesContent":["import iterateJsdoc, {\n parseComment,\n} from '../iterateJsdoc.js';\nimport {\n getTags,\n} from '../jsdocUtils.js';\nimport {\n getJSDocComment,\n parse as parseType,\n traverse,\n tryParse as tryParseType,\n} from '@es-joy/jsdoccomment';\n\nexport default iterateJsdoc(({\n jsdoc,\n node,\n report,\n settings,\n sourceCode,\n utils,\n}) => {\n const {\n mode,\n } = settings;\n\n const templateTags = utils.getTags('template');\n\n const usedNames = new Set();\n /**\n * @param {string} potentialType\n */\n const checkForUsedTypes = (potentialType) => {\n let parsedType;\n try {\n parsedType = mode === 'permissive' ?\n tryParseType(/** @type {string} */ (potentialType)) :\n parseType(/** @type {string} */ (potentialType), mode);\n } catch {\n return;\n }\n\n traverse(parsedType, (nde) => {\n const {\n type,\n value,\n } = /** @type {import('jsdoc-type-pratt-parser').NameResult} */ (nde);\n if (type === 'JsdocTypeName') {\n usedNames.add(value);\n }\n });\n };\n\n const checkParamsAndReturnsTags = (jsdc = jsdoc) => {\n const paramName = /** @type {string} */ (utils.getPreferredTagName({\n tagName: 'param',\n }));\n const paramTags = getTags(jsdc, paramName);\n for (const paramTag of paramTags) {\n checkForUsedTypes(paramTag.type);\n }\n\n const returnsName = /** @type {string} */ (utils.getPreferredTagName({\n tagName: 'returns',\n }));\n const returnsTags = getTags(jsdc, returnsName);\n for (const returnsTag of returnsTags) {\n checkForUsedTypes(returnsTag.type);\n }\n };\n\n const checkTemplateTags = () => {\n for (const tag of templateTags) {\n const {\n name,\n } = tag;\n const names = name.split(/,\\s*/v);\n for (const nme of names) {\n if (!usedNames.has(nme)) {\n report(`@template ${nme} not in use`, null, tag);\n }\n }\n }\n };\n\n /**\n * @param {import('@typescript-eslint/types').TSESTree.FunctionDeclaration|\n * import('@typescript-eslint/types').TSESTree.ClassDeclaration|\n * import('@typescript-eslint/types').TSESTree.TSInterfaceDeclaration|\n * import('@typescript-eslint/types').TSESTree.TSTypeAliasDeclaration} aliasDeclaration\n * @param {boolean} [checkParamsAndReturns]\n */\n const checkParameters = (aliasDeclaration, checkParamsAndReturns) => {\n /* c8 ignore next -- Guard */\n const {\n params,\n } = aliasDeclaration.typeParameters ?? {\n params: [],\n };\n for (const {\n name: {\n name,\n },\n } of params) {\n usedNames.add(name);\n }\n\n if (checkParamsAndReturns) {\n checkParamsAndReturnsTags();\n } else if (aliasDeclaration.type === 'ClassDeclaration') {\n /* c8 ignore next -- TS */\n for (const nde of aliasDeclaration?.body?.body ?? []) {\n // @ts-expect-error Should be ok\n const commentNode = getJSDocComment(sourceCode, nde, settings);\n if (!commentNode) {\n continue;\n }\n\n const innerJsdoc = parseComment(commentNode, '');\n checkParamsAndReturnsTags(innerJsdoc);\n\n const typeName = /** @type {string} */ (utils.getPreferredTagName({\n tagName: 'type',\n }));\n const typeTags = getTags(innerJsdoc, typeName);\n for (const typeTag of typeTags) {\n checkForUsedTypes(typeTag.type);\n }\n }\n }\n\n checkTemplateTags();\n };\n\n const handleTypeAliases = () => {\n const nde = /** @type {import('@typescript-eslint/types').TSESTree.Node} */ (\n node\n );\n if (!nde) {\n return;\n }\n\n switch (nde.type) {\n case 'ClassDeclaration':\n case 'TSInterfaceDeclaration':\n case 'TSTypeAliasDeclaration':\n checkParameters(nde);\n break;\n case 'ExportDefaultDeclaration':\n case 'ExportNamedDeclaration':\n switch (nde.declaration?.type) {\n case 'ClassDeclaration':\n case 'TSInterfaceDeclaration':\n case 'TSTypeAliasDeclaration':\n checkParameters(nde.declaration);\n break;\n case 'FunctionDeclaration':\n checkParameters(nde.declaration, true);\n break;\n }\n\n break;\n case 'FunctionDeclaration':\n checkParameters(nde, true);\n break;\n }\n };\n\n const callbackTags = utils.getTags('callback');\n const functionTags = utils.getTags('function');\n if (callbackTags.length || functionTags.length) {\n checkParamsAndReturnsTags();\n checkTemplateTags();\n return;\n }\n\n const typedefTags = utils.getTags('typedef');\n if (!typedefTags.length || typedefTags.length >= 2) {\n handleTypeAliases();\n return;\n }\n\n const potentialTypedefType = typedefTags[0].type;\n checkForUsedTypes(potentialTypedefType);\n\n const propertyName = /** @type {string} */ (utils.getPreferredTagName({\n tagName: 'property',\n }));\n const propertyTags = utils.getTags(propertyName);\n for (const propertyTag of propertyTags) {\n checkForUsedTypes(propertyTag.type);\n }\n\n checkTemplateTags();\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Checks that any `@template` names are actually used in the connected `@typedef` or type alias.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-template-names.md#repos-sticky-header',\n },\n schema: [],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AAGA,IAAAE,aAAA,GAAAF,OAAA;AAK8B,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAA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MC,YAAY,GAAG,qBAAuBpD,KAAK,CAACmB,mBAAmB,CAAC;IACpEC,OAAO,EAAE;EACX,CAAC,CAAE;EACH,MAAMiC,YAAY,GAAGrD,KAAK,CAACG,OAAO,CAACiD,YAAY,CAAC;EAChD,KAAK,MAAME,WAAW,IAAID,YAAY,EAAE;IACtC/C,iBAAiB,CAACgD,WAAW,CAACzC,IAAI,CAAC;EACrC;EAEAa,iBAAiB,CAAC,CAAC;AACrB,CAAC,EAAE;EACD6B,gBAAgB,EAAE,IAAI;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,gGAAgG;MAC7GC,GAAG,EAAE;IACP,CAAC;IACDC,MAAM,EAAE,EAAE;IACV/C,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAgD,MAAA,CAAApE,OAAA,GAAAA,OAAA,CAAAV,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"checkTemplateNames.cjs","names":["_iterateJsdoc","_interopRequireWildcard","require","_jsdocUtils","_jsdoccomment","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_default","exports","iterateJsdoc","jsdoc","node","report","settings","sourceCode","utils","mode","templateTags","getTags","usedNames","Set","checkForUsedTypes","potentialType","parsedType","tryParseType","parseType","traverse","nde","type","value","add","checkParamsAndReturnsTags","jsdc","paramName","getPreferredTagName","tagName","paramTags","paramTag","returnsName","returnsTags","returnsTag","checkTemplateTags","tag","names","parseClosureTemplateTag","nme","checkParameters","aliasDeclaration","checkParamsAndReturns","params","typeParameters","name","body","commentNode","getJSDocComment","innerJsdoc","parseComment","typeName","typeTags","typeTag","handleTypeAliases","declaration","callbackTags","functionTags","length","typedefTags","potentialTypedefType","propertyName","propertyTags","propertyTag","iterateAllJsdocs","meta","docs","description","url","schema","module"],"sources":["../../src/rules/checkTemplateNames.js"],"sourcesContent":["import iterateJsdoc, {\n parseComment,\n} from '../iterateJsdoc.js';\nimport {\n getTags,\n} from '../jsdocUtils.js';\nimport {\n getJSDocComment,\n parse as parseType,\n traverse,\n tryParse as tryParseType,\n} from '@es-joy/jsdoccomment';\n\nexport default iterateJsdoc(({\n jsdoc,\n node,\n report,\n settings,\n sourceCode,\n utils,\n}) => {\n const {\n mode,\n } = settings;\n\n const templateTags = utils.getTags('template');\n\n const usedNames = new Set();\n /**\n * @param {string} potentialType\n */\n const checkForUsedTypes = (potentialType) => {\n let parsedType;\n try {\n parsedType = mode === 'permissive' ?\n tryParseType(/** @type {string} */ (potentialType)) :\n parseType(/** @type {string} */ (potentialType), mode);\n } catch {\n return;\n }\n\n traverse(parsedType, (nde) => {\n const {\n type,\n value,\n } = /** @type {import('jsdoc-type-pratt-parser').NameResult} */ (nde);\n if (type === 'JsdocTypeName') {\n usedNames.add(value);\n }\n });\n };\n\n const checkParamsAndReturnsTags = (jsdc = jsdoc) => {\n const paramName = /** @type {string} */ (utils.getPreferredTagName({\n tagName: 'param',\n }));\n const paramTags = getTags(jsdc, paramName);\n for (const paramTag of paramTags) {\n checkForUsedTypes(paramTag.type);\n }\n\n const returnsName = /** @type {string} */ (utils.getPreferredTagName({\n tagName: 'returns',\n }));\n const returnsTags = getTags(jsdc, returnsName);\n for (const returnsTag of returnsTags) {\n checkForUsedTypes(returnsTag.type);\n }\n };\n\n const checkTemplateTags = () => {\n for (const tag of templateTags) {\n const names = utils.parseClosureTemplateTag(tag);\n for (const nme of names) {\n if (!usedNames.has(nme)) {\n report(`@template ${nme} not in use`, null, tag);\n }\n }\n }\n };\n\n /**\n * @param {import('@typescript-eslint/types').TSESTree.FunctionDeclaration|\n * import('@typescript-eslint/types').TSESTree.ClassDeclaration|\n * import('@typescript-eslint/types').TSESTree.TSInterfaceDeclaration|\n * import('@typescript-eslint/types').TSESTree.TSTypeAliasDeclaration} aliasDeclaration\n * @param {boolean} [checkParamsAndReturns]\n */\n const checkParameters = (aliasDeclaration, checkParamsAndReturns) => {\n /* c8 ignore next -- Guard */\n const {\n params,\n } = aliasDeclaration.typeParameters ?? {\n params: [],\n };\n for (const {\n name: {\n name,\n },\n } of params) {\n usedNames.add(name);\n }\n\n if (checkParamsAndReturns) {\n checkParamsAndReturnsTags();\n } else if (aliasDeclaration.type === 'ClassDeclaration') {\n /* c8 ignore next -- TS */\n for (const nde of aliasDeclaration?.body?.body ?? []) {\n // @ts-expect-error Should be ok\n const commentNode = getJSDocComment(sourceCode, nde, settings);\n if (!commentNode) {\n continue;\n }\n\n const innerJsdoc = parseComment(commentNode, '');\n checkParamsAndReturnsTags(innerJsdoc);\n\n const typeName = /** @type {string} */ (utils.getPreferredTagName({\n tagName: 'type',\n }));\n const typeTags = getTags(innerJsdoc, typeName);\n for (const typeTag of typeTags) {\n checkForUsedTypes(typeTag.type);\n }\n }\n }\n\n checkTemplateTags();\n };\n\n const handleTypeAliases = () => {\n const nde = /** @type {import('@typescript-eslint/types').TSESTree.Node} */ (\n node\n );\n if (!nde) {\n return;\n }\n\n switch (nde.type) {\n case 'ClassDeclaration':\n case 'TSInterfaceDeclaration':\n case 'TSTypeAliasDeclaration':\n checkParameters(nde);\n break;\n case 'ExportDefaultDeclaration':\n case 'ExportNamedDeclaration':\n switch (nde.declaration?.type) {\n case 'ClassDeclaration':\n case 'TSInterfaceDeclaration':\n case 'TSTypeAliasDeclaration':\n checkParameters(nde.declaration);\n break;\n case 'FunctionDeclaration':\n checkParameters(nde.declaration, true);\n break;\n }\n\n break;\n case 'FunctionDeclaration':\n checkParameters(nde, true);\n break;\n }\n };\n\n const callbackTags = utils.getTags('callback');\n const functionTags = utils.getTags('function');\n if (callbackTags.length || functionTags.length) {\n checkParamsAndReturnsTags();\n checkTemplateTags();\n return;\n }\n\n const typedefTags = utils.getTags('typedef');\n if (!typedefTags.length || typedefTags.length >= 2) {\n handleTypeAliases();\n return;\n }\n\n const potentialTypedefType = typedefTags[0].type;\n checkForUsedTypes(potentialTypedefType);\n\n const propertyName = /** @type {string} */ (utils.getPreferredTagName({\n tagName: 'property',\n }));\n const propertyTags = utils.getTags(propertyName);\n for (const propertyTag of propertyTags) {\n checkForUsedTypes(propertyTag.type);\n }\n\n checkTemplateTags();\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Checks that any `@template` names are actually used in the connected `@typedef` or type alias.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-template-names.md#repos-sticky-header',\n },\n schema: [],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AAGA,IAAAE,aAAA,GAAAF,OAAA;AAK8B,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA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C,YAAY,GAAG/C,KAAK,CAACG,OAAO,CAAC,UAAU,CAAC;EAC9C,MAAM6C,YAAY,GAAGhD,KAAK,CAACG,OAAO,CAAC,UAAU,CAAC;EAC9C,IAAI4C,YAAY,CAACE,MAAM,IAAID,YAAY,CAACC,MAAM,EAAE;IAC9CjC,yBAAyB,CAAC,CAAC;IAC3BU,iBAAiB,CAAC,CAAC;IACnB;EACF;EAEA,MAAMwB,WAAW,GAAGlD,KAAK,CAACG,OAAO,CAAC,SAAS,CAAC;EAC5C,IAAI,CAAC+C,WAAW,CAACD,MAAM,IAAIC,WAAW,CAACD,MAAM,IAAI,CAAC,EAAE;IAClDJ,iBAAiB,CAAC,CAAC;IACnB;EACF;EAEA,MAAMM,oBAAoB,GAAGD,WAAW,CAAC,CAAC,CAAC,CAACrC,IAAI;EAChDP,iBAAiB,CAAC6C,oBAAoB,CAAC;EAEvC,MAAMC,YAAY,GAAG,qBAAuBpD,KAAK,CAACmB,mBAAmB,CAAC;IACpEC,OAAO,EAAE;EACX,CAAC,CAAE;EACH,MAAMiC,YAAY,GAAGrD,KAAK,CAACG,OAAO,CAACiD,YAAY,CAAC;EAChD,KAAK,MAAME,WAAW,IAAID,YAAY,EAAE;IACtC/C,iBAAiB,CAACgD,WAAW,CAACzC,IAAI,CAAC;EACrC;EAEAa,iBAAiB,CAAC,CAAC;AACrB,CAAC,EAAE;EACD6B,gBAAgB,EAAE,IAAI;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,gGAAgG;MAC7GC,GAAG,EAAE;IACP,CAAC;IACDC,MAAM,EAAE,EAAE;IACV/C,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAgD,MAAA,CAAApE,OAAA,GAAAA,OAAA,CAAAV,OAAA","ignoreList":[]}
@@ -30,10 +30,7 @@ var _default = exports.default = (0, _iterateJsdoc.default)(({
30
30
  });
31
31
  if (requireSeparateTemplates) {
32
32
  for (const tag of templateTags) {
33
- const {
34
- name
35
- } = tag;
36
- const names = name.split(/,\s*/v);
33
+ const names = utils.parseClosureTemplateTag(tag);
37
34
  if (names.length > 1) {
38
35
  report(`Missing separate @template for ${names[1]}`, null, tag);
39
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"requireTemplate.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","_jsdoccomment","e","__esModule","default","_default","exports","iterateJsdoc","context","node","report","settings","utils","avoidDocs","requireSeparateTemplates","options","mode","usedNames","Set","templateTags","getTags","templateNames","flatMap","tag","parseClosureTemplateTag","name","names","split","length","checkTypeParams","aliasDeclaration","params","typeParameters","add","usedName","includes","handleTypes","nde","type","declaration","usedNameToTag","Map","checkForUsedTypes","potentialTag","parsedType","tryParseType","parseType","traverse","value","test","has","set","checkTagsAndTemplates","tagNames","tagName","preferredTagName","getPreferredTagName","matchingTags","matchingTag","get","callbackTags","functionTags","typedefTags","potentialTypedef","iterateAllJsdocs","meta","docs","description","url","schema","additionalProperties","properties","exemptedBy","items","module"],"sources":["../../src/rules/requireTemplate.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\nimport {\n parse as parseType,\n traverse,\n tryParse as tryParseType,\n} from '@es-joy/jsdoccomment';\n\nexport default iterateJsdoc(({\n context,\n node,\n report,\n settings,\n utils,\n}) => {\n if (utils.avoidDocs()) {\n return;\n }\n\n const {\n requireSeparateTemplates = false,\n } = context.options[0] || {};\n\n const {\n mode,\n } = settings;\n\n const usedNames = new Set();\n const templateTags = utils.getTags('template');\n const templateNames = templateTags.flatMap((tag) => {\n return utils.parseClosureTemplateTag(tag);\n });\n\n if (requireSeparateTemplates) {\n for (const tag of templateTags) {\n const {\n name,\n } = tag;\n const names = name.split(/,\\s*/v);\n if (names.length > 1) {\n report(`Missing separate @template for ${names[1]}`, null, tag);\n }\n }\n }\n\n /**\n * @param {import('@typescript-eslint/types').TSESTree.FunctionDeclaration|\n * import('@typescript-eslint/types').TSESTree.ClassDeclaration|\n * import('@typescript-eslint/types').TSESTree.TSInterfaceDeclaration|\n * import('@typescript-eslint/types').TSESTree.TSTypeAliasDeclaration} aliasDeclaration\n */\n const checkTypeParams = (aliasDeclaration) => {\n const {\n params,\n /* c8 ignore next -- Guard */\n } = aliasDeclaration.typeParameters ?? {\n /* c8 ignore next -- Guard */\n params: [],\n };\n for (const {\n name: {\n name,\n },\n } of params) {\n usedNames.add(name);\n }\n\n for (const usedName of usedNames) {\n if (!templateNames.includes(usedName)) {\n report(`Missing @template ${usedName}`);\n }\n }\n };\n\n const handleTypes = () => {\n const nde = /** @type {import('@typescript-eslint/types').TSESTree.Node} */ (\n node\n );\n if (!nde) {\n return;\n }\n\n switch (nde.type) {\n case 'ClassDeclaration':\n case 'FunctionDeclaration':\n case 'TSInterfaceDeclaration':\n case 'TSTypeAliasDeclaration':\n checkTypeParams(nde);\n break;\n case 'ExportDefaultDeclaration':\n switch (nde.declaration?.type) {\n case 'ClassDeclaration':\n case 'FunctionDeclaration':\n case 'TSInterfaceDeclaration':\n checkTypeParams(nde.declaration);\n break;\n }\n\n break;\n case 'ExportNamedDeclaration':\n switch (nde.declaration?.type) {\n case 'ClassDeclaration':\n case 'FunctionDeclaration':\n case 'TSInterfaceDeclaration':\n case 'TSTypeAliasDeclaration':\n checkTypeParams(nde.declaration);\n break;\n }\n\n break;\n }\n };\n\n const usedNameToTag = new Map();\n\n /**\n * @param {import('comment-parser').Spec} potentialTag\n */\n const checkForUsedTypes = (potentialTag) => {\n let parsedType;\n try {\n parsedType = mode === 'permissive' ?\n tryParseType(/** @type {string} */ (potentialTag.type)) :\n parseType(/** @type {string} */ (potentialTag.type), mode);\n } catch {\n return;\n }\n\n traverse(parsedType, (nde) => {\n const {\n type,\n value,\n } = /** @type {import('jsdoc-type-pratt-parser').NameResult} */ (nde);\n if (type === 'JsdocTypeName' && (/^[A-Z]$/v).test(value)) {\n usedNames.add(value);\n if (!usedNameToTag.has(value)) {\n usedNameToTag.set(value, potentialTag);\n }\n }\n });\n };\n\n /**\n * @param {string[]} tagNames\n */\n const checkTagsAndTemplates = (tagNames) => {\n for (const tagName of tagNames) {\n const preferredTagName = /** @type {string} */ (utils.getPreferredTagName({\n tagName,\n }));\n const matchingTags = utils.getTags(preferredTagName);\n for (const matchingTag of matchingTags) {\n checkForUsedTypes(matchingTag);\n }\n }\n\n // Could check against whitelist/blacklist\n for (const usedName of usedNames) {\n if (!templateNames.includes(usedName)) {\n report(`Missing @template ${usedName}`, null, usedNameToTag.get(usedName));\n }\n }\n };\n\n const callbackTags = utils.getTags('callback');\n const functionTags = utils.getTags('function');\n if (callbackTags.length || functionTags.length) {\n checkTagsAndTemplates([\n 'param', 'returns',\n ]);\n return;\n }\n\n const typedefTags = utils.getTags('typedef');\n if (!typedefTags.length || typedefTags.length >= 2) {\n handleTypes();\n return;\n }\n\n const potentialTypedef = typedefTags[0];\n checkForUsedTypes(potentialTypedef);\n\n checkTagsAndTemplates([\n 'property',\n ]);\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Requires template tags for each generic type parameter',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md#repos-sticky-header',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n exemptedBy: {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n requireSeparateTemplates: {\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAI8B,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEf,IAAAG,qBAAY,EAAC,CAAC;EAC3BC,OAAO;EACPC,IAAI;EACJC,MAAM;EACNC,QAAQ;EACRC;AACF,CAAC,KAAK;EACJ,IAAIA,KAAK,CAACC,S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M,IAAI,CAAC,EAAE;IAClDQ,WAAW,CAAC,CAAC;IACb;EACF;EAEA,MAAM2B,gBAAgB,GAAGD,WAAW,CAAC,CAAC,CAAC;EACvCpB,iBAAiB,CAACqB,gBAAgB,CAAC;EAEnCX,qBAAqB,CAAC,CACpB,UAAU,CACX,CAAC;AACJ,CAAC,EAAE;EACDY,gBAAgB,EAAE,IAAI;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,wDAAwD;MACrEC,GAAG,EAAE;IACP,CAAC;IACDC,MAAM,EAAE,CACN;MACEC,oBAAoB,EAAE,KAAK;MAC3BC,UAAU,EAAE;QACVC,UAAU,EAAE;UACVC,KAAK,EAAE;YACLnC,IAAI,EAAE;UACR,CAAC;UACDA,IAAI,EAAE;QACR,CAAC;QACDxB,wBAAwB,EAAE;UACxBwB,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAoC,MAAA,CAAApE,OAAA,GAAAA,OAAA,CAAAF,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"requireTemplate.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","_jsdoccomment","e","__esModule","default","_default","exports","iterateJsdoc","context","node","report","settings","utils","avoidDocs","requireSeparateTemplates","options","mode","usedNames","Set","templateTags","getTags","templateNames","flatMap","tag","parseClosureTemplateTag","names","length","checkTypeParams","aliasDeclaration","params","typeParameters","name","add","usedName","includes","handleTypes","nde","type","declaration","usedNameToTag","Map","checkForUsedTypes","potentialTag","parsedType","tryParseType","parseType","traverse","value","test","has","set","checkTagsAndTemplates","tagNames","tagName","preferredTagName","getPreferredTagName","matchingTags","matchingTag","get","callbackTags","functionTags","typedefTags","potentialTypedef","iterateAllJsdocs","meta","docs","description","url","schema","additionalProperties","properties","exemptedBy","items","module"],"sources":["../../src/rules/requireTemplate.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\nimport {\n parse as parseType,\n traverse,\n tryParse as tryParseType,\n} from '@es-joy/jsdoccomment';\n\nexport default iterateJsdoc(({\n context,\n node,\n report,\n settings,\n utils,\n}) => {\n if (utils.avoidDocs()) {\n return;\n }\n\n const {\n requireSeparateTemplates = false,\n } = context.options[0] || {};\n\n const {\n mode,\n } = settings;\n\n const usedNames = new Set();\n const templateTags = utils.getTags('template');\n const templateNames = templateTags.flatMap((tag) => {\n return utils.parseClosureTemplateTag(tag);\n });\n\n if (requireSeparateTemplates) {\n for (const tag of templateTags) {\n const names = utils.parseClosureTemplateTag(tag);\n if (names.length > 1) {\n report(`Missing separate @template for ${names[1]}`, null, tag);\n }\n }\n }\n\n /**\n * @param {import('@typescript-eslint/types').TSESTree.FunctionDeclaration|\n * import('@typescript-eslint/types').TSESTree.ClassDeclaration|\n * import('@typescript-eslint/types').TSESTree.TSInterfaceDeclaration|\n * import('@typescript-eslint/types').TSESTree.TSTypeAliasDeclaration} aliasDeclaration\n */\n const checkTypeParams = (aliasDeclaration) => {\n const {\n params,\n /* c8 ignore next -- Guard */\n } = aliasDeclaration.typeParameters ?? {\n /* c8 ignore next -- Guard */\n params: [],\n };\n for (const {\n name: {\n name,\n },\n } of params) {\n usedNames.add(name);\n }\n\n for (const usedName of usedNames) {\n if (!templateNames.includes(usedName)) {\n report(`Missing @template ${usedName}`);\n }\n }\n };\n\n const handleTypes = () => {\n const nde = /** @type {import('@typescript-eslint/types').TSESTree.Node} */ (\n node\n );\n if (!nde) {\n return;\n }\n\n switch (nde.type) {\n case 'ClassDeclaration':\n case 'FunctionDeclaration':\n case 'TSInterfaceDeclaration':\n case 'TSTypeAliasDeclaration':\n checkTypeParams(nde);\n break;\n case 'ExportDefaultDeclaration':\n switch (nde.declaration?.type) {\n case 'ClassDeclaration':\n case 'FunctionDeclaration':\n case 'TSInterfaceDeclaration':\n checkTypeParams(nde.declaration);\n break;\n }\n\n break;\n case 'ExportNamedDeclaration':\n switch (nde.declaration?.type) {\n case 'ClassDeclaration':\n case 'FunctionDeclaration':\n case 'TSInterfaceDeclaration':\n case 'TSTypeAliasDeclaration':\n checkTypeParams(nde.declaration);\n break;\n }\n\n break;\n }\n };\n\n const usedNameToTag = new Map();\n\n /**\n * @param {import('comment-parser').Spec} potentialTag\n */\n const checkForUsedTypes = (potentialTag) => {\n let parsedType;\n try {\n parsedType = mode === 'permissive' ?\n tryParseType(/** @type {string} */ (potentialTag.type)) :\n parseType(/** @type {string} */ (potentialTag.type), mode);\n } catch {\n return;\n }\n\n traverse(parsedType, (nde) => {\n const {\n type,\n value,\n } = /** @type {import('jsdoc-type-pratt-parser').NameResult} */ (nde);\n if (type === 'JsdocTypeName' && (/^[A-Z]$/v).test(value)) {\n usedNames.add(value);\n if (!usedNameToTag.has(value)) {\n usedNameToTag.set(value, potentialTag);\n }\n }\n });\n };\n\n /**\n * @param {string[]} tagNames\n */\n const checkTagsAndTemplates = (tagNames) => {\n for (const tagName of tagNames) {\n const preferredTagName = /** @type {string} */ (utils.getPreferredTagName({\n tagName,\n }));\n const matchingTags = utils.getTags(preferredTagName);\n for (const matchingTag of matchingTags) {\n checkForUsedTypes(matchingTag);\n }\n }\n\n // Could check against whitelist/blacklist\n for (const usedName of usedNames) {\n if (!templateNames.includes(usedName)) {\n report(`Missing @template ${usedName}`, null, usedNameToTag.get(usedName));\n }\n }\n };\n\n const callbackTags = utils.getTags('callback');\n const functionTags = utils.getTags('function');\n if (callbackTags.length || functionTags.length) {\n checkTagsAndTemplates([\n 'param', 'returns',\n ]);\n return;\n }\n\n const typedefTags = utils.getTags('typedef');\n if (!typedefTags.length || typedefTags.length >= 2) {\n handleTypes();\n return;\n }\n\n const potentialTypedef = typedefTags[0];\n checkForUsedTypes(potentialTypedef);\n\n checkTagsAndTemplates([\n 'property',\n ]);\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Requires template tags for each generic type parameter',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md#repos-sticky-header',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n exemptedBy: {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n requireSeparateTemplates: {\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAI8B,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEf,IAAAG,qBAAY,EAAC,CAAC;EAC3BC,OAAO;EACPC,IAAI;EACJC,MAAM;EACNC,QAAQ;EACRC;AACF,CAAC,KAAK;EACJ,IAAIA,KAAK,CAACC,SAAS,CAAC,CAAC,EAAE;IACrB;EACF;EAEA,MAAM;IACJC,wBAAwB,GAAG;EAC7B,CAAC,GAAGN,OAAO,CAACO,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;EAE5B,MAAM;IACJC;EACF,CAAC,GAAGL,QAAQ;EAEZ,MAAMM,SAAS,GAAG,IAAIC,GAAG,CAAC,CAAC;EAC3B,MAAMC,YAAY,GAAGP,KAAK,CAACQ,OAAO,CAAC,UAAU,CAAC;EAC9C,MAAMC,aAAa,GAAGF,YAAY,CAACG,OAAO,CAAEC,GAAG,IAAK;IAClD,OAAOX,KAAK,CAACY,uBAAuB,CAACD,GAAG,CAAC;EAC3C,CAAC,CAAC;EAEF,IAAIT,wBAAwB,EAAE;IAC5B,KAAK,MAAMS,GAAG,IAAIJ,YAAY,EAAE;MAC9B,MAAMM,KAAK,GAAGb,KAAK,CAACY,uBAAuB,CAACD,GAAG,CAAC;MAChD,IAAIE,KAAK,CAACC,MAAM,GAAG,CAAC,EAAE;QACpBhB,MAAM,CAAC,kCAAkCe,KAAK,CAAC,CAAC,CAAC,EAAE,E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-docs": "babel-node ./src/bin/generateDocs.js --check",
144
144
  "create-docs": "pnpm run create-options && babel-node ./src/bin/generateDocs.js",
145
145
  "create-rule": "babel-node ./src/bin/generateRule.js",
146
- "create-options": "node ./src/bin/generateOptions.mjs",
146
+ "create-options": "node ./src/bin/generateOptions.js",
147
147
  "install-offline": "pnpm install --prefer-offline --no-audit",
148
148
  "lint": "eslint",
149
149
  "lint-fix": "eslint --fix",
@@ -153,5 +153,5 @@
153
153
  "test-cov": "TIMING=1 c8 --reporter text pnpm run test-no-cov",
154
154
  "test-index": "pnpm run test-no-cov test/rules/index.js"
155
155
  },
156
- "version": "54.3.0"
156
+ "version": "54.4.0"
157
157
  }
package/src/index.js CHANGED
@@ -137,7 +137,7 @@ const index = {
137
137
  /**
138
138
  * @param {"warn"|"error"} warnOrError
139
139
  * @param {string} [flatName]
140
- * @returns {import('eslint').Linter.FlatConfig}
140
+ * @returns {import('eslint').Linter.Config}
141
141
  */
142
142
  const createRecommendedRuleset = (warnOrError, flatName) => {
143
143
  return {
@@ -216,7 +216,7 @@ const createRecommendedRuleset = (warnOrError, flatName) => {
216
216
  /**
217
217
  * @param {"warn"|"error"} warnOrError
218
218
  * @param {string} [flatName]
219
- * @returns {import('eslint').Linter.FlatConfig}
219
+ * @returns {import('eslint').Linter.Config}
220
220
  */
221
221
  const createRecommendedTypeScriptRuleset = (warnOrError, flatName) => {
222
222
  const ruleset = createRecommendedRuleset(warnOrError, flatName);
@@ -244,7 +244,7 @@ const createRecommendedTypeScriptRuleset = (warnOrError, flatName) => {
244
244
  /**
245
245
  * @param {"warn"|"error"} warnOrError
246
246
  * @param {string} [flatName]
247
- * @returns {import('eslint').Linter.FlatConfig}
247
+ * @returns {import('eslint').Linter.Config}
248
248
  */
249
249
  const createRecommendedTypeScriptFlavorRuleset = (warnOrError, flatName) => {
250
250
  const ruleset = createRecommendedRuleset(warnOrError, flatName);
@@ -267,7 +267,7 @@ const createStandaloneRulesetFactory = (ruleNames) => {
267
267
  /**
268
268
  * @param {"warn"|"error"} warnOrError
269
269
  * @param {string} [flatName]
270
- * @returns {import('eslint').Linter.FlatConfig}
270
+ * @returns {import('eslint').Linter.Config}
271
271
  */
272
272
  return (warnOrError, flatName) => {
273
273
  return {
@@ -411,7 +411,7 @@ index.configs['flat/stylistic-typescript-error'] = createStylisticTypeScriptRule
411
411
  index.configs['flat/stylistic-typescript-flavor'] = createStylisticTypeScriptFlavorRuleset('warn', 'flat/stylistic-typescript-flavor');
412
412
  index.configs['flat/stylistic-typescript-flavor-error'] = createStylisticTypeScriptFlavorRuleset('error', 'flat/stylistic-typescript-error-flavor');
413
413
 
414
- index.configs.examples = /** @type {import('eslint').Linter.FlatConfig[]} */ ([
414
+ index.configs.examples = /** @type {import('eslint').Linter.Config[]} */ ([
415
415
  {
416
416
  files: [
417
417
  '**/*.js',
@@ -465,7 +465,7 @@ index.configs.examples = /** @type {import('eslint').Linter.FlatConfig[]} */ ([
465
465
  },
466
466
  ]);
467
467
 
468
- index.configs['default-expressions'] = /** @type {import('eslint').Linter.FlatConfig[]} */ ([
468
+ index.configs['default-expressions'] = /** @type {import('eslint').Linter.Config[]} */ ([
469
469
  {
470
470
  files: [
471
471
  '**/*.js',
@@ -502,7 +502,7 @@ index.configs['default-expressions'] = /** @type {import('eslint').Linter.FlatCo
502
502
  },
503
503
  ]);
504
504
 
505
- index.configs['examples-and-default-expressions'] = /** @type {import('eslint').Linter.FlatConfig[]} */ ([
505
+ index.configs['examples-and-default-expressions'] = /** @type {import('eslint').Linter.Config[]} */ ([
506
506
  {
507
507
  name: 'jsdoc/examples-and-default-expressions',
508
508
  plugins: {
@@ -1,28 +1,30 @@
1
1
  import iterateJsdoc from '../iterateJsdoc.js';
2
2
 
3
- /**
4
- * @param {string} string
5
- * @returns {string}
6
- */
7
- const trimStart = (string) => {
8
- return string.replace(/^\s+/v, '');
9
- };
10
-
11
3
  export default iterateJsdoc(({
4
+ context,
12
5
  indent,
13
6
  jsdocNode,
14
7
  report,
15
8
  sourceCode,
16
9
  }) => {
10
+ const {
11
+ innerIndent = 1,
12
+ } = context.options[0] || {};
13
+
17
14
  // `indent` is whitespace from line 1 (`/**`), so slice and account for "/".
18
- const indentLevel = indent.length + 1;
15
+ const indentLevel = indent.length + innerIndent;
19
16
  const sourceLines = sourceCode.getText(jsdocNode).split('\n')
20
17
  .slice(1)
21
- .map((line) => {
22
- return line.split('*')[0];
18
+ .map((line, number) => {
19
+ return {
20
+ line: line.split('*')[0],
21
+ number,
22
+ };
23
23
  })
24
- .filter((line) => {
25
- return !trimStart(line).length;
24
+ .filter(({
25
+ line,
26
+ }) => {
27
+ return !line.trimStart().length;
26
28
  });
27
29
 
28
30
  /** @type {import('eslint').Rule.ReportFixer} */
@@ -30,19 +32,22 @@ export default iterateJsdoc(({
30
32
  const replacement = sourceCode.getText(jsdocNode).split('\n')
31
33
  .map((line, index) => {
32
34
  // Ignore the first line and all lines not starting with `*`
33
- const ignored = !index || trimStart(line.split('*')[0]).length;
35
+ const ignored = !index || line.split('*')[0].trimStart().length;
34
36
 
35
- return ignored ? line : `${indent} ${trimStart(line)}`;
37
+ return ignored ? line : `${indent}${''.padStart(innerIndent, ' ')}${line.trimStart()}`;
36
38
  })
37
39
  .join('\n');
38
40
 
39
41
  return fixer.replaceText(jsdocNode, replacement);
40
42
  };
41
43
 
42
- sourceLines.some((line, lineNum) => {
44
+ sourceLines.some(({
45
+ line,
46
+ number,
47
+ }) => {
43
48
  if (line.length !== indentLevel) {
44
49
  report('Expected JSDoc block to be aligned.', fix, {
45
- line: lineNum + 1,
50
+ line: number + 1,
46
51
  });
47
52
 
48
53
  return true;
@@ -58,6 +63,17 @@ export default iterateJsdoc(({
58
63
  url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header',
59
64
  },
60
65
  fixable: 'code',
66
+ schema: [
67
+ {
68
+ additionalProperties: false,
69
+ properties: {
70
+ innerIndent: {
71
+ default: 1,
72
+ type: 'integer',
73
+ },
74
+ },
75
+ },
76
+ ],
61
77
  type: 'layout',
62
78
  },
63
79
  });
@@ -70,10 +70,7 @@ export default iterateJsdoc(({
70
70
 
71
71
  const checkTemplateTags = () => {
72
72
  for (const tag of templateTags) {
73
- const {
74
- name,
75
- } = tag;
76
- const names = name.split(/,\s*/v);
73
+ const names = utils.parseClosureTemplateTag(tag);
77
74
  for (const nme of names) {
78
75
  if (!usedNames.has(nme)) {
79
76
  report(`@template ${nme} not in use`, null, tag);
@@ -32,10 +32,7 @@ export default iterateJsdoc(({
32
32
 
33
33
  if (requireSeparateTemplates) {
34
34
  for (const tag of templateTags) {
35
- const {
36
- name,
37
- } = tag;
38
- const names = name.split(/,\s*/v);
35
+ const names = utils.parseClosureTemplateTag(tag);
39
36
  if (names.length > 1) {
40
37
  report(`Missing separate @template for ${names[1]}`, null, tag);
41
38
  }