eslint-plugin-jsdoc 48.9.1 → 48.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/getJsdocProcessorPlugin.cjs +5 -2
- package/dist/getJsdocProcessorPlugin.cjs.map +1 -1
- package/dist/index.cjs +8 -4
- package/dist/index.cjs.map +1 -1
- package/dist/rules/checkExamples.cjs +1 -1
- package/dist/rules/checkExamples.cjs.map +1 -1
- package/package.json +1 -1
- package/src/getJsdocProcessorPlugin.js +6 -2
- package/src/index.js +8 -4
- package/src/rules/checkExamples.js +2 -3
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getJsdocProcessorPlugin = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _nodeFs = require("node:fs");
|
|
8
|
+
var _nodePath = require("node:path");
|
|
9
|
+
var _nodeUrl = require("node:url");
|
|
8
10
|
var espree = _interopRequireWildcard(require("espree"));
|
|
9
11
|
var _jsdocUtils = require("./jsdocUtils.cjs");
|
|
10
12
|
var _jsdoccomment = require("@es-joy/jsdoccomment");
|
|
@@ -12,11 +14,12 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
12
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
15
|
// Todo: Support TS by fenced block type
|
|
14
16
|
|
|
17
|
+
const _dirname = (0, _nodePath.dirname)((0, _nodeUrl.fileURLToPath)(require('url').pathToFileURL(__filename).toString()));
|
|
15
18
|
const {
|
|
16
19
|
version
|
|
17
20
|
} = JSON.parse(
|
|
18
21
|
// @ts-expect-error `Buffer` is ok for `JSON.parse`
|
|
19
|
-
(0,
|
|
22
|
+
(0, _nodeFs.readFileSync)((0, _nodePath.join)(_dirname, '../package.json')));
|
|
20
23
|
|
|
21
24
|
// const zeroBasedLineIndexAdjust = -1;
|
|
22
25
|
const likelyNestedJSDocIndentSpace = 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getJsdocProcessorPlugin.cjs","names":["_fs","require","espree","_interopRequireWildcard","_jsdocUtils","_jsdoccomment","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","version","JSON","parse","readFileSync","likelyNestedJSDocIndentSpace","preTagSpaceLength","firstLinePrefixLength","hasCaptionRegex","escapeStringRegexp","str","replaceAll","countChars","ch","match","RegExp","length","getLinesCols","text","matchLines","colDelta","slice","lastIndexOf","getJsdocProcessorPlugin","options","exampleCodeRegex","rejectExampleCodeRegex","checkExamples","checkDefaults","checkParams","checkProperties","matchingFileName","matchingFileNameDefaults","matchingFileNameParams","matchingFileNameProperties","paddedIndent","captionRequired","sourceType","parser","undefined","exampleCodeRegExp","rejectExampleCodeRegExp","getRegexFromString","otherInfo","extraMessages","getTextsAndFileNames","jsdoc","jsFileName","commentLineCols","textsAndFileNames","checkSource","filename","ext","defaultFileName","lines","cols","skipInit","source","targetTagName","sources","tag","line","push","nonJSPrefacingCols","nonJSPrefacingLines","string","addSourceInfo","src","file","number","codeStartLine","codeStartCol","targetSource","getFilenameInfo","includes","replace","filenameInfo","forEachPreferredTag","description","trim","getTagDescription","tagName","getPreferredTagName","hasTag","matchingFilenameInfo","column","severity","message","ruleId","test","startingIndex","lastStringCount","exampleCode","lastIndex","exec","index","n0","n1","preMatch","preMatchLines","nonJSPreface","nonJSPrefaceLineCount","idx","indexOf","charsInLastLine","global","meta","name","processors","examples","preprocess","ast","parseForESLint","ecmaVersion","comment","err","jsdocComments","comments","filter","value","map","start","range","textToStart","parseComment","flatMap","Boolean","console","log","postprocess","jsMessages","messages","forEach","msg","fatal","endColumn","endLine","codeCtxLine","codeCtxColumn","startLine","startCol","ret","concat","supportsAutofix","exports"],"sources":["../src/getJsdocProcessorPlugin.js"],"sourcesContent":["// Todo: Support TS by fenced block type\n\nimport {readFileSync} from 'fs';\nimport * as espree from 'espree';\nimport {\n getRegexFromString,\n forEachPreferredTag,\n getTagDescription,\n getPreferredTagName,\n hasTag,\n} from './jsdocUtils.js';\nimport {\n parseComment,\n} from '@es-joy/jsdoccomment';\n\nconst {version} = JSON.parse(\n // @ts-expect-error `Buffer` is ok for `JSON.parse`\n readFileSync('./package.json')\n);\n\n// const zeroBasedLineIndexAdjust = -1;\nconst likelyNestedJSDocIndentSpace = 1;\nconst preTagSpaceLength = 1;\n\n// If a space is present, we should ignore it\nconst firstLinePrefixLength = preTagSpaceLength;\n\nconst hasCaptionRegex = /^\\s*<caption>([\\s\\S]*?)<\\/caption>/u;\n\n/**\n * @param {string} str\n * @returns {string}\n */\nconst escapeStringRegexp = (str) => {\n return str.replaceAll(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&');\n};\n\n/**\n * @param {string} str\n * @param {string} ch\n * @returns {import('./iterateJsdoc.js').Integer}\n */\nconst countChars = (str, ch) => {\n return (str.match(new RegExp(escapeStringRegexp(ch), 'gu')) || []).length;\n};\n\n/**\n * @param {string} text\n * @returns {[\n* import('./iterateJsdoc.js').Integer,\n* import('./iterateJsdoc.js').Integer\n* ]}\n*/\nconst getLinesCols = (text) => {\n const matchLines = countChars(text, '\\n');\n\n const colDelta = matchLines ?\n text.slice(text.lastIndexOf('\\n') + 1).length :\n text.length;\n\n return [\n matchLines, colDelta,\n ];\n};\n\n/**\n * @typedef {number} Integer\n */\n\n/**\n * @typedef {object} JsdocProcessorOptions\n * @property {boolean} [captionRequired]\n * @property {Integer} [paddedIndent]\n * @property {boolean} [checkDefaults]\n * @property {boolean} [checkParams]\n * @property {boolean} [checkExamples]\n * @property {boolean} [checkProperties]\n * @property {string} [matchingFileName]\n * @property {string} [matchingFileNameDefaults]\n * @property {string} [matchingFileNameParams]\n * @property {string} [matchingFileNameProperties]\n * @property {string} [exampleCodeRegex]\n * @property {string} [rejectExampleCodeRegex]\n * @property {\"script\"|\"module\"} [sourceType]\n * @property {import('eslint').Linter.FlatConfigParserModule} [parser]\n */\n\n/**\n * We use a function for the ability of the user to pass in a config, but\n * without requiring all users of the plugin to do so.\n * @param {JsdocProcessorOptions} [options]\n */\nexport const getJsdocProcessorPlugin = (options = {}) => {\n const {\n exampleCodeRegex = null,\n rejectExampleCodeRegex = null,\n checkExamples = true,\n checkDefaults = false,\n checkParams = false,\n checkProperties = false,\n matchingFileName = null,\n matchingFileNameDefaults = null,\n matchingFileNameParams = null,\n matchingFileNameProperties = null,\n paddedIndent = 0,\n captionRequired = false,\n sourceType = 'module',\n parser = undefined\n } = options;\n\n /** @type {RegExp} */\n let exampleCodeRegExp;\n /** @type {RegExp} */\n let rejectExampleCodeRegExp;\n\n if (exampleCodeRegex) {\n exampleCodeRegExp = getRegexFromString(exampleCodeRegex);\n }\n\n if (rejectExampleCodeRegex) {\n rejectExampleCodeRegExp = getRegexFromString(rejectExampleCodeRegex);\n }\n\n /**\n * @type {{\n * targetTagName: string,\n * ext: string,\n * codeStartLine: number,\n * codeStartCol: number,\n * nonJSPrefacingCols: number,\n * commentLineCols: [number, number]\n * }[]}\n */\n const otherInfo = [];\n\n /** @type {import('eslint').Linter.LintMessage[]} */\n let extraMessages = [];\n\n /**\n * @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc\n * @param {string} jsFileName\n * @param {[number, number]} commentLineCols\n */\n const getTextsAndFileNames = (jsdoc, jsFileName, commentLineCols) => {\n /**\n * @type {{\n * text: string,\n * filename: string|null|undefined\n * }[]}\n */\n const textsAndFileNames = [];\n\n /**\n * @param {{\n * filename: string|null,\n * defaultFileName: string|undefined,\n * source: string,\n * targetTagName: string,\n * rules?: import('eslint').Linter.RulesRecord|undefined,\n * lines?: import('./iterateJsdoc.js').Integer,\n * cols?: import('./iterateJsdoc.js').Integer,\n * skipInit?: boolean,\n * ext: string,\n * sources?: {\n * nonJSPrefacingCols: import('./iterateJsdoc.js').Integer,\n * nonJSPrefacingLines: import('./iterateJsdoc.js').Integer,\n * string: string,\n * }[],\n * tag?: import('comment-parser').Spec & {\n * line?: import('./iterateJsdoc.js').Integer,\n * }|{\n * line: import('./iterateJsdoc.js').Integer,\n * }\n * }} cfg\n */\n const checkSource = ({\n filename,\n ext,\n defaultFileName,\n lines = 0,\n cols = 0,\n skipInit,\n source,\n targetTagName,\n sources = [],\n tag = {\n line: 0,\n },\n }) => {\n if (!skipInit) {\n sources.push({\n nonJSPrefacingCols: cols,\n nonJSPrefacingLines: lines,\n string: source,\n });\n }\n\n /**\n * @param {{\n * nonJSPrefacingCols: import('./iterateJsdoc.js').Integer,\n * nonJSPrefacingLines: import('./iterateJsdoc.js').Integer,\n * string: string\n * }} cfg\n */\n const addSourceInfo = function ({\n nonJSPrefacingCols,\n nonJSPrefacingLines,\n string,\n }) {\n const src = paddedIndent ?\n string.replaceAll(new RegExp(`(^|\\n) {${paddedIndent}}(?!$)`, 'gu'), '\\n') :\n string;\n\n // Programmatic ESLint API: https://eslint.org/docs/developer-guide/nodejs-api\n const file = filename || defaultFileName;\n\n if (!('line' in tag)) {\n tag.line = tag.source[0].number;\n }\n\n // NOTE: `tag.line` can be 0 if of form `/** @tag ... */`\n const codeStartLine = /**\n * @type {import('comment-parser').Spec & {\n * line: import('./iterateJsdoc.js').Integer,\n * }}\n */ (tag).line + nonJSPrefacingLines;\n const codeStartCol = likelyNestedJSDocIndentSpace;\n\n textsAndFileNames.push({\n text: src,\n filename: file,\n });\n otherInfo.push({\n targetTagName,\n ext,\n codeStartLine,\n codeStartCol,\n nonJSPrefacingCols,\n commentLineCols\n });\n };\n\n for (const targetSource of sources) {\n addSourceInfo(targetSource);\n }\n };\n\n /**\n *\n * @param {string|null} filename\n * @param {string} [ext] Since `eslint-plugin-markdown` v2, and\n * ESLint 7, this is the default which other JS-fenced rules will used.\n * Formerly \"md\" was the default.\n * @returns {{\n * defaultFileName: string|undefined,\n * filename: string|null,\n * ext: string\n * }}\n */\n const getFilenameInfo = (filename, ext = 'md/*.js') => {\n let defaultFileName;\n if (!filename) {\n if (typeof jsFileName === 'string' && jsFileName.includes('.')) {\n defaultFileName = jsFileName.replace(/\\.[^.]*$/u, `.${ext}`);\n } else {\n defaultFileName = `dummy.${ext}`;\n }\n }\n\n return {\n ext,\n defaultFileName,\n filename,\n };\n };\n\n if (checkDefaults) {\n const filenameInfo = getFilenameInfo(matchingFileNameDefaults, 'jsdoc-defaults');\n forEachPreferredTag(jsdoc, 'default', (tag, targetTagName) => {\n if (!tag.description.trim()) {\n return;\n }\n\n checkSource({\n source: `(${getTagDescription(tag)})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n if (checkParams) {\n const filenameInfo = getFilenameInfo(matchingFileNameParams, 'jsdoc-params');\n forEachPreferredTag(jsdoc, 'param', (tag, targetTagName) => {\n if (!tag.default || !tag.default.trim()) {\n return;\n }\n\n checkSource({\n source: `(${tag.default})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n if (checkProperties) {\n const filenameInfo = getFilenameInfo(matchingFileNameProperties, 'jsdoc-properties');\n forEachPreferredTag(jsdoc, 'property', (tag, targetTagName) => {\n if (!tag.default || !tag.default.trim()) {\n return;\n }\n\n checkSource({\n source: `(${tag.default})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n if (!checkExamples) {\n return textsAndFileNames;\n }\n\n const tagName = /** @type {string} */ (getPreferredTagName(jsdoc, {\n tagName: 'example',\n }));\n if (!hasTag(jsdoc, tagName)) {\n return textsAndFileNames;\n }\n\n const matchingFilenameInfo = getFilenameInfo(matchingFileName);\n\n forEachPreferredTag(jsdoc, 'example', (tag, targetTagName) => {\n let source = /** @type {string} */ (getTagDescription(tag));\n const match = source.match(hasCaptionRegex);\n\n if (captionRequired && (!match || !match[1].trim())) {\n extraMessages.push({\n line: 1 + commentLineCols[0] + (tag.line ?? tag.source[0].number),\n column: commentLineCols[1] + 1,\n severity: 2,\n message: `@${targetTagName} error - Caption is expected for examples.`,\n ruleId: 'jsdoc/example-missing-caption'\n });\n return;\n }\n\n source = source.replace(hasCaptionRegex, '');\n const [\n lines,\n cols,\n ] = match ? getLinesCols(match[0]) : [\n 0, 0,\n ];\n\n if (exampleCodeRegex && !exampleCodeRegExp.test(source) ||\n rejectExampleCodeRegex && rejectExampleCodeRegExp.test(source)\n ) {\n return;\n }\n\n const sources = [];\n let skipInit = false;\n if (exampleCodeRegex) {\n let nonJSPrefacingCols = 0;\n let nonJSPrefacingLines = 0;\n\n let startingIndex = 0;\n let lastStringCount = 0;\n\n let exampleCode;\n exampleCodeRegExp.lastIndex = 0;\n while ((exampleCode = exampleCodeRegExp.exec(source)) !== null) {\n const {\n index,\n '0': n0,\n '1': n1,\n } = exampleCode;\n\n // Count anything preceding user regex match (can affect line numbering)\n const preMatch = source.slice(startingIndex, index);\n\n const [\n preMatchLines,\n colDelta,\n ] = getLinesCols(preMatch);\n\n let nonJSPreface;\n let nonJSPrefaceLineCount;\n if (n1) {\n const idx = n0.indexOf(n1);\n nonJSPreface = n0.slice(0, idx);\n nonJSPrefaceLineCount = countChars(nonJSPreface, '\\n');\n } else {\n nonJSPreface = '';\n nonJSPrefaceLineCount = 0;\n }\n\n nonJSPrefacingLines += lastStringCount + preMatchLines + nonJSPrefaceLineCount;\n\n // Ignore `preMatch` delta if newlines here\n if (nonJSPrefaceLineCount) {\n const charsInLastLine = nonJSPreface.slice(nonJSPreface.lastIndexOf('\\n') + 1).length;\n\n nonJSPrefacingCols += charsInLastLine;\n } else {\n nonJSPrefacingCols += colDelta + nonJSPreface.length;\n }\n\n const string = n1 || n0;\n sources.push({\n nonJSPrefacingCols,\n nonJSPrefacingLines,\n string,\n });\n startingIndex = exampleCodeRegExp.lastIndex;\n lastStringCount = countChars(string, '\\n');\n if (!exampleCodeRegExp.global) {\n break;\n }\n }\n\n skipInit = true;\n }\n\n checkSource({\n cols,\n lines,\n skipInit,\n source,\n sources,\n tag,\n targetTagName,\n ...matchingFilenameInfo,\n });\n });\n\n return textsAndFileNames;\n };\n\n // See https://eslint.org/docs/latest/extend/plugins#processors-in-plugins\n // See https://eslint.org/docs/latest/extend/custom-processors\n // From https://github.com/eslint/eslint/issues/14745#issuecomment-869457265\n /*\n {\n \"files\": [\"*.js\", \"*.ts\"],\n \"processor\": \"jsdoc/example\" // a pretended value here\n },\n {\n \"files\": [\n \"*.js/*_jsdoc-example.js\",\n \"*.ts/*_jsdoc-example.js\",\n \"*.js/*_jsdoc-example.ts\"\n ],\n \"rules\": {\n // specific rules for examples in jsdoc only here\n // And other rules for `.js` and `.ts` will also be enabled for them\n }\n }\n */\n return {\n meta: {\n name: 'eslint-plugin-jsdoc/processor',\n version,\n },\n processors: {\n examples: {\n meta: {\n name: 'eslint-plugin-jsdoc/preprocessor',\n version,\n },\n /**\n * @param {string} text\n * @param {string} filename\n */\n preprocess (text, filename) {\n try {\n let ast;\n\n // May be running a second time so catch and ignore\n try {\n ast = parser\n // @ts-expect-error Ok\n ? parser.parseForESLint(text, {\n ecmaVersion: 'latest',\n sourceType,\n comment: true\n }).ast\n : espree.parse(text, {\n ecmaVersion: 'latest',\n sourceType,\n comment: true\n });\n } catch (err) {\n return [text];\n }\n\n /** @type {[number, number][]} */\n const commentLineCols = [];\n const jsdocComments = /** @type {import('estree').Comment[]} */ (\n /**\n * @type {import('estree').Program & {\n * comments?: import('estree').Comment[]\n * }}\n */\n (ast).comments\n ).filter((comment) => {\n return (/^\\*\\s/u).test(comment.value);\n }).map((comment) => {\n /* c8 ignore next -- Unsupporting processors only? */\n const [start] = comment.range ?? [];\n const textToStart = text.slice(0, start);\n\n const [lines, cols] = getLinesCols(textToStart);\n\n // const lines = [...textToStart.matchAll(/\\n/gu)].length\n // const lastLinePos = textToStart.lastIndexOf('\\n');\n // const cols = lastLinePos === -1\n // ? 0\n // : textToStart.slice(lastLinePos).length;\n commentLineCols.push([lines, cols]);\n return parseComment(comment);\n });\n\n return [\n text,\n ...jsdocComments.flatMap((jsdoc, idx) => {\n return getTextsAndFileNames(\n jsdoc,\n filename,\n commentLineCols[idx]\n );\n }).filter(Boolean)\n ];\n /* c8 ignore next 3 */\n } catch (err) {\n console.log('err', filename, err);\n }\n },\n\n /**\n * @param {import('eslint').Linter.LintMessage[][]} messages\n * @param {string} filename\n */\n postprocess ([jsMessages, ...messages], filename) {\n messages.forEach((message, idx) => {\n const {\n targetTagName,\n codeStartLine,\n codeStartCol,\n nonJSPrefacingCols,\n commentLineCols\n } = otherInfo[idx];\n\n message.forEach((msg) => {\n const {\n message,\n ruleId,\n severity,\n fatal,\n line,\n column,\n endColumn,\n endLine,\n\n // Todo: Make fixable\n // fix\n // fix: {range: [number, number], text: string}\n // suggestions: {desc: , messageId:, fix: }[],\n } = msg;\n\n const [codeCtxLine, codeCtxColumn] = commentLineCols;\n const startLine = codeCtxLine + codeStartLine + line;\n const startCol = 1 + // Seems to need one more now\n codeCtxColumn + codeStartCol + (\n // This might not work for line 0, but line 0 is unlikely for examples\n line <= 1 ? nonJSPrefacingCols + firstLinePrefixLength : preTagSpaceLength\n ) + column;\n\n msg.message = '@' + targetTagName + ' ' + (severity === 2 ? 'error' : 'warning') +\n (ruleId ? ' (' + ruleId + ')' : '') + ': ' +\n (fatal ? 'Fatal: ' : '') +\n message;\n msg.line = startLine;\n msg.column = startCol;\n msg.endLine = endLine ? startLine + endLine : startLine;\n // added `- column` to offset what `endColumn` already seemed to include\n msg.endColumn = endColumn ? startCol - column + endColumn : startCol;\n });\n });\n\n const ret = [...jsMessages].concat(...messages, ...extraMessages);\n extraMessages = [];\n return ret;\n },\n supportsAutofix: true\n },\n },\n };\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B;cACAV,IAAI,IAAI,CAAC,GAAGE,kBAAkB,GAAGxD,qBAAqB,GAAGD,iBAAiB,CAC3E,GAAG+E,MAAM;cAEZgD,GAAG,CAAC9C,OAAO,GAAG,GAAG,GAAG7B,aAAa,GAAG,GAAG,IAAI4B,QAAQ,KAAK,CAAC,GAAG,OAAO,GAAG,SAAS,CAAC,IAC7EE,MAAM,GAAG,IAAI,GAAGA,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,GAAG,IAAI,IACzC8C,KAAK,GAAG,SAAS,GAAG,EAAE,CAAC,GACxB/C,OAAO;cACT8C,GAAG,CAACxE,IAAI,GAAG8E,SAAS;cACpBN,GAAG,CAAChD,MAAM,GAAGuD,QAAQ;cACrBP,GAAG,CAACG,OAAO,GAAGA,OAAO,GAAGG,SAAS,GAAGH,OAAO,GAAGG,SAAS;cACvD;cACAN,GAAG,CAACE,SAAS,GAAGA,SAAS,GAAGK,QAAQ,GAAGvD,MAAM,GAAGkD,SAAS,GAAGK,QAAQ;YACtE,CAAC,CAAC;UACJ,CAAC,CAAC;UAEF,MAAMC,GAAG,GAAG,CAAC,GAAGX,UAAU,CAAC,CAACY,MAAM,CAAC,GAAGX,QAAQ,EAAE,GAAGvF,aAAa,CAAC;UACjEA,aAAa,GAAG,EAAE;UAClB,OAAOiG,GAAG;QACZ,CAAC;QACDE,eAAe,EAAE;MACnB;IACF;EACF,CAAC;AACH,CAAC;AAACC,OAAA,CAAAzH,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"getJsdocProcessorPlugin.cjs","names":["_nodeFs","require","_nodePath","_nodeUrl","espree","_interopRequireWildcard","_jsdocUtils","_jsdoccomment","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","__dirname","dirname","fileURLToPath","pathToFileURL","__filename","toString","version","JSON","parse","readFileSync","join","likelyNestedJSDocIndentSpace","preTagSpaceLength","firstLinePrefixLength","hasCaptionRegex","escapeStringRegexp","str","replaceAll","countChars","ch","match","RegExp","length","getLinesCols","text","matchLines","colDelta","slice","lastIndexOf","getJsdocProcessorPlugin","options","exampleCodeRegex","rejectExampleCodeRegex","checkExamples","checkDefaults","checkParams","checkProperties","matchingFileName","matchingFileNameDefaults","matchingFileNameParams","matchingFileNameProperties","paddedIndent","captionRequired","sourceType","parser","undefined","exampleCodeRegExp","rejectExampleCodeRegExp","getRegexFromString","otherInfo","extraMessages","getTextsAndFileNames","jsdoc","jsFileName","commentLineCols","textsAndFileNames","checkSource","filename","ext","defaultFileName","lines","cols","skipInit","source","targetTagName","sources","tag","line","push","nonJSPrefacingCols","nonJSPrefacingLines","string","addSourceInfo","src","file","number","codeStartLine","codeStartCol","targetSource","getFilenameInfo","includes","replace","filenameInfo","forEachPreferredTag","description","trim","getTagDescription","tagName","getPreferredTagName","hasTag","matchingFilenameInfo","column","severity","message","ruleId","test","startingIndex","lastStringCount","exampleCode","lastIndex","exec","index","n0","n1","preMatch","preMatchLines","nonJSPreface","nonJSPrefaceLineCount","idx","indexOf","charsInLastLine","global","meta","name","processors","examples","preprocess","ast","parseForESLint","ecmaVersion","comment","err","jsdocComments","comments","filter","value","map","start","range","textToStart","parseComment","flatMap","Boolean","console","log","postprocess","jsMessages","messages","forEach","msg","fatal","endColumn","endLine","codeCtxLine","codeCtxColumn","startLine","startCol","ret","concat","supportsAutofix","exports"],"sources":["../src/getJsdocProcessorPlugin.js"],"sourcesContent":["// Todo: Support TS by fenced block type\n\nimport {readFileSync} from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport * as espree from 'espree';\nimport {\n getRegexFromString,\n forEachPreferredTag,\n getTagDescription,\n getPreferredTagName,\n hasTag,\n} from './jsdocUtils.js';\nimport {\n parseComment,\n} from '@es-joy/jsdoccomment';\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nconst {version} = JSON.parse(\n // @ts-expect-error `Buffer` is ok for `JSON.parse`\n readFileSync(join(__dirname, '../package.json'))\n);\n\n// const zeroBasedLineIndexAdjust = -1;\nconst likelyNestedJSDocIndentSpace = 1;\nconst preTagSpaceLength = 1;\n\n// If a space is present, we should ignore it\nconst firstLinePrefixLength = preTagSpaceLength;\n\nconst hasCaptionRegex = /^\\s*<caption>([\\s\\S]*?)<\\/caption>/u;\n\n/**\n * @param {string} str\n * @returns {string}\n */\nconst escapeStringRegexp = (str) => {\n return str.replaceAll(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&');\n};\n\n/**\n * @param {string} str\n * @param {string} ch\n * @returns {import('./iterateJsdoc.js').Integer}\n */\nconst countChars = (str, ch) => {\n return (str.match(new RegExp(escapeStringRegexp(ch), 'gu')) || []).length;\n};\n\n/**\n * @param {string} text\n * @returns {[\n* import('./iterateJsdoc.js').Integer,\n* import('./iterateJsdoc.js').Integer\n* ]}\n*/\nconst getLinesCols = (text) => {\n const matchLines = countChars(text, '\\n');\n\n const colDelta = matchLines ?\n text.slice(text.lastIndexOf('\\n') + 1).length :\n text.length;\n\n return [\n matchLines, colDelta,\n ];\n};\n\n/**\n * @typedef {number} Integer\n */\n\n/**\n * @typedef {object} JsdocProcessorOptions\n * @property {boolean} [captionRequired]\n * @property {Integer} [paddedIndent]\n * @property {boolean} [checkDefaults]\n * @property {boolean} [checkParams]\n * @property {boolean} [checkExamples]\n * @property {boolean} [checkProperties]\n * @property {string} [matchingFileName]\n * @property {string} [matchingFileNameDefaults]\n * @property {string} [matchingFileNameParams]\n * @property {string} [matchingFileNameProperties]\n * @property {string} [exampleCodeRegex]\n * @property {string} [rejectExampleCodeRegex]\n * @property {\"script\"|\"module\"} [sourceType]\n * @property {import('eslint').Linter.FlatConfigParserModule} [parser]\n */\n\n/**\n * We use a function for the ability of the user to pass in a config, but\n * without requiring all users of the plugin to do so.\n * @param {JsdocProcessorOptions} [options]\n */\nexport const getJsdocProcessorPlugin = (options = {}) => {\n const {\n exampleCodeRegex = null,\n rejectExampleCodeRegex = null,\n checkExamples = true,\n checkDefaults = false,\n checkParams = false,\n checkProperties = false,\n matchingFileName = null,\n matchingFileNameDefaults = null,\n matchingFileNameParams = null,\n matchingFileNameProperties = null,\n paddedIndent = 0,\n captionRequired = false,\n sourceType = 'module',\n parser = undefined\n } = options;\n\n /** @type {RegExp} */\n let exampleCodeRegExp;\n /** @type {RegExp} */\n let rejectExampleCodeRegExp;\n\n if (exampleCodeRegex) {\n exampleCodeRegExp = getRegexFromString(exampleCodeRegex);\n }\n\n if (rejectExampleCodeRegex) {\n rejectExampleCodeRegExp = getRegexFromString(rejectExampleCodeRegex);\n }\n\n /**\n * @type {{\n * targetTagName: string,\n * ext: string,\n * codeStartLine: number,\n * codeStartCol: number,\n * nonJSPrefacingCols: number,\n * commentLineCols: [number, number]\n * }[]}\n */\n const otherInfo = [];\n\n /** @type {import('eslint').Linter.LintMessage[]} */\n let extraMessages = [];\n\n /**\n * @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc\n * @param {string} jsFileName\n * @param {[number, number]} commentLineCols\n */\n const getTextsAndFileNames = (jsdoc, jsFileName, commentLineCols) => {\n /**\n * @type {{\n * text: string,\n * filename: string|null|undefined\n * }[]}\n */\n const textsAndFileNames = [];\n\n /**\n * @param {{\n * filename: string|null,\n * defaultFileName: string|undefined,\n * source: string,\n * targetTagName: string,\n * rules?: import('eslint').Linter.RulesRecord|undefined,\n * lines?: import('./iterateJsdoc.js').Integer,\n * cols?: import('./iterateJsdoc.js').Integer,\n * skipInit?: boolean,\n * ext: string,\n * sources?: {\n * nonJSPrefacingCols: import('./iterateJsdoc.js').Integer,\n * nonJSPrefacingLines: import('./iterateJsdoc.js').Integer,\n * string: string,\n * }[],\n * tag?: import('comment-parser').Spec & {\n * line?: import('./iterateJsdoc.js').Integer,\n * }|{\n * line: import('./iterateJsdoc.js').Integer,\n * }\n * }} cfg\n */\n const checkSource = ({\n filename,\n ext,\n defaultFileName,\n lines = 0,\n cols = 0,\n skipInit,\n source,\n targetTagName,\n sources = [],\n tag = {\n line: 0,\n },\n }) => {\n if (!skipInit) {\n sources.push({\n nonJSPrefacingCols: cols,\n nonJSPrefacingLines: lines,\n string: source,\n });\n }\n\n /**\n * @param {{\n * nonJSPrefacingCols: import('./iterateJsdoc.js').Integer,\n * nonJSPrefacingLines: import('./iterateJsdoc.js').Integer,\n * string: string\n * }} cfg\n */\n const addSourceInfo = function ({\n nonJSPrefacingCols,\n nonJSPrefacingLines,\n string,\n }) {\n const src = paddedIndent ?\n string.replaceAll(new RegExp(`(^|\\n) {${paddedIndent}}(?!$)`, 'gu'), '\\n') :\n string;\n\n // Programmatic ESLint API: https://eslint.org/docs/developer-guide/nodejs-api\n const file = filename || defaultFileName;\n\n if (!('line' in tag)) {\n tag.line = tag.source[0].number;\n }\n\n // NOTE: `tag.line` can be 0 if of form `/** @tag ... */`\n const codeStartLine = /**\n * @type {import('comment-parser').Spec & {\n * line: import('./iterateJsdoc.js').Integer,\n * }}\n */ (tag).line + nonJSPrefacingLines;\n const codeStartCol = likelyNestedJSDocIndentSpace;\n\n textsAndFileNames.push({\n text: src,\n filename: file,\n });\n otherInfo.push({\n targetTagName,\n ext,\n codeStartLine,\n codeStartCol,\n nonJSPrefacingCols,\n commentLineCols\n });\n };\n\n for (const targetSource of sources) {\n addSourceInfo(targetSource);\n }\n };\n\n /**\n *\n * @param {string|null} filename\n * @param {string} [ext] Since `eslint-plugin-markdown` v2, and\n * ESLint 7, this is the default which other JS-fenced rules will used.\n * Formerly \"md\" was the default.\n * @returns {{\n * defaultFileName: string|undefined,\n * filename: string|null,\n * ext: string\n * }}\n */\n const getFilenameInfo = (filename, ext = 'md/*.js') => {\n let defaultFileName;\n if (!filename) {\n if (typeof jsFileName === 'string' && jsFileName.includes('.')) {\n defaultFileName = jsFileName.replace(/\\.[^.]*$/u, `.${ext}`);\n } else {\n defaultFileName = `dummy.${ext}`;\n }\n }\n\n return {\n ext,\n defaultFileName,\n filename,\n };\n };\n\n if (checkDefaults) {\n const filenameInfo = getFilenameInfo(matchingFileNameDefaults, 'jsdoc-defaults');\n forEachPreferredTag(jsdoc, 'default', (tag, targetTagName) => {\n if (!tag.description.trim()) {\n return;\n }\n\n checkSource({\n source: `(${getTagDescription(tag)})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n if (checkParams) {\n const filenameInfo = getFilenameInfo(matchingFileNameParams, 'jsdoc-params');\n forEachPreferredTag(jsdoc, 'param', (tag, targetTagName) => {\n if (!tag.default || !tag.default.trim()) {\n return;\n }\n\n checkSource({\n source: `(${tag.default})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n if (checkProperties) {\n const filenameInfo = getFilenameInfo(matchingFileNameProperties, 'jsdoc-properties');\n forEachPreferredTag(jsdoc, 'property', (tag, targetTagName) => {\n if (!tag.default || !tag.default.trim()) {\n return;\n }\n\n checkSource({\n source: `(${tag.default})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n if (!checkExamples) {\n return textsAndFileNames;\n }\n\n const tagName = /** @type {string} */ (getPreferredTagName(jsdoc, {\n tagName: 'example',\n }));\n if (!hasTag(jsdoc, tagName)) {\n return textsAndFileNames;\n }\n\n const matchingFilenameInfo = getFilenameInfo(matchingFileName);\n\n forEachPreferredTag(jsdoc, 'example', (tag, targetTagName) => {\n let source = /** @type {string} */ (getTagDescription(tag));\n const match = source.match(hasCaptionRegex);\n\n if (captionRequired && (!match || !match[1].trim())) {\n extraMessages.push({\n line: 1 + commentLineCols[0] + (tag.line ?? tag.source[0].number),\n column: commentLineCols[1] + 1,\n severity: 2,\n message: `@${targetTagName} error - Caption is expected for examples.`,\n ruleId: 'jsdoc/example-missing-caption'\n });\n return;\n }\n\n source = source.replace(hasCaptionRegex, '');\n const [\n lines,\n cols,\n ] = match ? getLinesCols(match[0]) : [\n 0, 0,\n ];\n\n if (exampleCodeRegex && !exampleCodeRegExp.test(source) ||\n rejectExampleCodeRegex && rejectExampleCodeRegExp.test(source)\n ) {\n return;\n }\n\n const sources = [];\n let skipInit = false;\n if (exampleCodeRegex) {\n let nonJSPrefacingCols = 0;\n let nonJSPrefacingLines = 0;\n\n let startingIndex = 0;\n let lastStringCount = 0;\n\n let exampleCode;\n exampleCodeRegExp.lastIndex = 0;\n while ((exampleCode = exampleCodeRegExp.exec(source)) !== null) {\n const {\n index,\n '0': n0,\n '1': n1,\n } = exampleCode;\n\n // Count anything preceding user regex match (can affect line numbering)\n const preMatch = source.slice(startingIndex, index);\n\n const [\n preMatchLines,\n colDelta,\n ] = getLinesCols(preMatch);\n\n let nonJSPreface;\n let nonJSPrefaceLineCount;\n if (n1) {\n const idx = n0.indexOf(n1);\n nonJSPreface = n0.slice(0, idx);\n nonJSPrefaceLineCount = countChars(nonJSPreface, '\\n');\n } else {\n nonJSPreface = '';\n nonJSPrefaceLineCount = 0;\n }\n\n nonJSPrefacingLines += lastStringCount + preMatchLines + nonJSPrefaceLineCount;\n\n // Ignore `preMatch` delta if newlines here\n if (nonJSPrefaceLineCount) {\n const charsInLastLine = nonJSPreface.slice(nonJSPreface.lastIndexOf('\\n') + 1).length;\n\n nonJSPrefacingCols += charsInLastLine;\n } else {\n nonJSPrefacingCols += colDelta + nonJSPreface.length;\n }\n\n const string = n1 || n0;\n sources.push({\n nonJSPrefacingCols,\n nonJSPrefacingLines,\n string,\n });\n startingIndex = exampleCodeRegExp.lastIndex;\n lastStringCount = countChars(string, '\\n');\n if (!exampleCodeRegExp.global) {\n break;\n }\n }\n\n skipInit = true;\n }\n\n checkSource({\n cols,\n lines,\n skipInit,\n source,\n sources,\n tag,\n targetTagName,\n ...matchingFilenameInfo,\n });\n });\n\n return textsAndFileNames;\n };\n\n // See https://eslint.org/docs/latest/extend/plugins#processors-in-plugins\n // See https://eslint.org/docs/latest/extend/custom-processors\n // From https://github.com/eslint/eslint/issues/14745#issuecomment-869457265\n /*\n {\n \"files\": [\"*.js\", \"*.ts\"],\n \"processor\": \"jsdoc/example\" // a pretended value here\n },\n {\n \"files\": [\n \"*.js/*_jsdoc-example.js\",\n \"*.ts/*_jsdoc-example.js\",\n \"*.js/*_jsdoc-example.ts\"\n ],\n \"rules\": {\n // specific rules for examples in jsdoc only here\n // And other rules for `.js` and `.ts` will also be enabled for them\n }\n }\n */\n return {\n meta: {\n name: 'eslint-plugin-jsdoc/processor',\n version,\n },\n processors: {\n examples: {\n meta: {\n name: 'eslint-plugin-jsdoc/preprocessor',\n version,\n },\n /**\n * @param {string} text\n * @param {string} filename\n */\n preprocess (text, filename) {\n try {\n let ast;\n\n // May be running a second time so catch and ignore\n try {\n ast = parser\n // @ts-expect-error Ok\n ? parser.parseForESLint(text, {\n ecmaVersion: 'latest',\n sourceType,\n comment: true\n }).ast\n : espree.parse(text, {\n ecmaVersion: 'latest',\n sourceType,\n comment: true\n });\n } catch (err) {\n return [text];\n }\n\n /** @type {[number, number][]} */\n const commentLineCols = [];\n const jsdocComments = /** @type {import('estree').Comment[]} */ (\n /**\n * @type {import('estree').Program & {\n * comments?: import('estree').Comment[]\n * }}\n */\n (ast).comments\n ).filter((comment) => {\n return (/^\\*\\s/u).test(comment.value);\n }).map((comment) => {\n /* c8 ignore next -- Unsupporting processors only? */\n const [start] = comment.range ?? [];\n const textToStart = text.slice(0, start);\n\n const [lines, cols] = getLinesCols(textToStart);\n\n // const lines = [...textToStart.matchAll(/\\n/gu)].length\n // const lastLinePos = textToStart.lastIndexOf('\\n');\n // const cols = lastLinePos === -1\n // ? 0\n // : textToStart.slice(lastLinePos).length;\n commentLineCols.push([lines, cols]);\n return parseComment(comment);\n });\n\n return [\n text,\n ...jsdocComments.flatMap((jsdoc, idx) => {\n return getTextsAndFileNames(\n jsdoc,\n filename,\n commentLineCols[idx]\n );\n }).filter(Boolean)\n ];\n /* c8 ignore next 3 */\n } catch (err) {\n console.log('err', filename, err);\n }\n },\n\n /**\n * @param {import('eslint').Linter.LintMessage[][]} messages\n * @param {string} filename\n */\n postprocess ([jsMessages, ...messages], filename) {\n messages.forEach((message, idx) => {\n const {\n targetTagName,\n codeStartLine,\n codeStartCol,\n nonJSPrefacingCols,\n commentLineCols\n } = otherInfo[idx];\n\n message.forEach((msg) => {\n const {\n message,\n ruleId,\n severity,\n fatal,\n line,\n column,\n endColumn,\n endLine,\n\n // Todo: Make fixable\n // fix\n // fix: {range: [number, number], text: string}\n // suggestions: {desc: , messageId:, fix: }[],\n } = msg;\n\n const [codeCtxLine, codeCtxColumn] = commentLineCols;\n const startLine = codeCtxLine + codeStartLine + line;\n const startCol = 1 + // Seems to need one more now\n codeCtxColumn + codeStartCol + (\n // This might not work for line 0, but line 0 is unlikely for examples\n line <= 1 ? nonJSPrefacingCols + firstLinePrefixLength : preTagSpaceLength\n ) + column;\n\n msg.message = '@' + targetTagName + ' ' + (severity === 2 ? 'error' : 'warning') +\n (ruleId ? ' (' + ruleId + ')' : '') + ': ' +\n (fatal ? 'Fatal: ' : '') +\n message;\n msg.line = startLine;\n msg.column = startCol;\n msg.endLine = endLine ? startLine + endLine : startLine;\n // added `- column` to offset what `endColumn` already seemed to include\n msg.endColumn = endColumn ? startCol - column + endColumn : startCol;\n });\n });\n\n const ret = [...jsMessages].concat(...messages, ...extraMessages);\n extraMessages = [];\n return ret;\n },\n supportsAutofix: true\n },\n },\n };\n};\n"],"mappings":";;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAOA,IAAAM,aAAA,GAAAN,OAAA;AAE8B,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAA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AC7EE,MAAM,GAAG,IAAI,GAAGA,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,GAAG,IAAI,IACzC8C,KAAK,GAAG,SAAS,GAAG,EAAE,CAAC,GACxB/C,OAAO;cACT8C,GAAG,CAACxE,IAAI,GAAG8E,SAAS;cACpBN,GAAG,CAAChD,MAAM,GAAGuD,QAAQ;cACrBP,GAAG,CAACG,OAAO,GAAGA,OAAO,GAAGG,SAAS,GAAGH,OAAO,GAAGG,SAAS;cACvD;cACAN,GAAG,CAACE,SAAS,GAAGA,SAAS,GAAGK,QAAQ,GAAGvD,MAAM,GAAGkD,SAAS,GAAGK,QAAQ;YACtE,CAAC,CAAC;UACJ,CAAC,CAAC;UAEF,MAAMC,GAAG,GAAG,CAAC,GAAGX,UAAU,CAAC,CAACY,MAAM,CAAC,GAAGX,QAAQ,EAAE,GAAGvF,aAAa,CAAC;UACjEA,aAAa,GAAG,EAAE;UAClB,OAAOiG,GAAG;QACZ,CAAC;QACDE,eAAe,EAAE;MACnB;IACF;EACF,CAAC;AACH,CAAC;AAACC,OAAA,CAAAzH,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -344,11 +344,15 @@ index.configs['examples-and-default-expressions'] = /** @type {import('eslint').
|
|
|
344
344
|
})
|
|
345
345
|
}
|
|
346
346
|
}, ...index.configs.examples.map(config => {
|
|
347
|
-
|
|
348
|
-
|
|
347
|
+
return {
|
|
348
|
+
...config,
|
|
349
|
+
plugins: {}
|
|
350
|
+
};
|
|
349
351
|
}), ...index.configs['default-expressions'].map(config => {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
+
return {
|
|
353
|
+
...config,
|
|
354
|
+
plugins: {}
|
|
355
|
+
};
|
|
352
356
|
})];
|
|
353
357
|
var _default = exports.default = index;
|
|
354
358
|
module.exports = exports.default;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["_checkAccess","_interopRequireDefault","require","_checkAlignment","_checkExamples","_checkIndentation","_checkLineAlignment","_checkParamNames","_checkPropertyNames","_checkSyntax","_checkTagNames","_checkTemplateNames","_checkTypes","_checkValues","_convertToJsdocComments","_emptyTags","_implementsOnClasses","_importsAsDependencies","_informativeDocs","_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","_getJsdocProcessorPlugin","e","__esModule","default","index","configs","rules","checkAccess","checkAlignment","checkExamples","checkIndentation","checkLineAlignment","checkParamNames","checkPropertyNames","checkSyntax","checkTagNames","checkTemplateNames","checkTypes","checkValues","convertToJsdocComments","emptyTags","implementsOnClasses","importsAsDependencies","informativeDocs","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","Error","recommended","examples","files","getJsdocProcessorPlugin","processor","checkDefaults","checkParams","checkProperties","quotes","semi","strict","map","config","_default","exports","module"],"sources":["../src/index.js"],"sourcesContent":["import 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 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\nimport { getJsdocProcessorPlugin } from './getJsdocProcessorPlugin.js';\n\n/**\n * @type {import('eslint').ESLint.Plugin & {\n * configs: Record<\n * \"recommended\"|\"recommended-error\"|\"recommended-typescript\"|\n * \"recommended-typescript-error\"|\"recommended-typescript-flavor\"|\n * \"recommended-typescript-flavor-error\"|\"flat/recommended\"|\n * \"flat/recommended-error\"|\"flat/recommended-typescript\"|\n * \"flat/recommended-typescript-error\"|\n * \"flat/recommended-typescript-flavor\"|\n * \"flat/recommended-typescript-flavor-error\",\n * import('eslint').Linter.FlatConfig\n * >\n * }}\n */\nconst index = {\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 '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 ? {name: 'jsdoc/' + flatName} : {}),\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/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 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 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 indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/no-undefined-types': 'off',\n /* eslint-enable indent */\n },\n };\n};\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.examples = /** @type {import('eslint').Linter.FlatConfig[]} */ ([\n {\n name: 'jsdoc/examples/processor',\n files: ['**/*.js'],\n plugins: {\n examples: getJsdocProcessorPlugin()\n },\n processor: 'examples/examples',\n },\n {\n name: 'jsdoc/examples/rules',\n files: ['**/*.md/*.js'],\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: ['**/*.js'],\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 name: 'jsdoc/default-expressions/rules',\n files: ['**/*.jsdoc-defaults', '**/*.jsdoc-params', '**/*.jsdoc-properties'],\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 delete config.plugins;\n return config;\n }),\n ...index.configs['default-expressions'].map((config) => {\n delete config.plugins;\n return config;\n })\n]);\n\nexport default index;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,mBAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,gBAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,mBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,YAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,cAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,mBAAA,GAAAV,sBAAA,CAAAC,OAAA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AACC,OAAO,CAAC,qBAAqB,CAAC,CAACgF,GAAG,CAAEC,MAAM,IAAK;EACtD,OAAOA,MAAM,CAACnB,OAAO;EACrB,OAAOmB,MAAM;AACf,CAAC,CAAC,CACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAArF,OAAA,GAEYC,KAAK;AAAAqF,MAAA,CAAAD,OAAA,GAAAA,OAAA,CAAArF,OAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["_checkAccess","_interopRequireDefault","require","_checkAlignment","_checkExamples","_checkIndentation","_checkLineAlignment","_checkParamNames","_checkPropertyNames","_checkSyntax","_checkTagNames","_checkTemplateNames","_checkTypes","_checkValues","_convertToJsdocComments","_emptyTags","_implementsOnClasses","_importsAsDependencies","_informativeDocs","_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","_getJsdocProcessorPlugin","e","__esModule","default","index","configs","rules","checkAccess","checkAlignment","checkExamples","checkIndentation","checkLineAlignment","checkParamNames","checkPropertyNames","checkSyntax","checkTagNames","checkTemplateNames","checkTypes","checkValues","convertToJsdocComments","emptyTags","implementsOnClasses","importsAsDependencies","informativeDocs","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","Error","recommended","examples","files","getJsdocProcessorPlugin","processor","checkDefaults","checkParams","checkProperties","quotes","semi","strict","map","config","_default","exports","module"],"sources":["../src/index.js"],"sourcesContent":["import 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 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\nimport { getJsdocProcessorPlugin } from './getJsdocProcessorPlugin.js';\n\n/**\n * @type {import('eslint').ESLint.Plugin & {\n * configs: Record<\n * \"recommended\"|\"recommended-error\"|\"recommended-typescript\"|\n * \"recommended-typescript-error\"|\"recommended-typescript-flavor\"|\n * \"recommended-typescript-flavor-error\"|\"flat/recommended\"|\n * \"flat/recommended-error\"|\"flat/recommended-typescript\"|\n * \"flat/recommended-typescript-error\"|\n * \"flat/recommended-typescript-flavor\"|\n * \"flat/recommended-typescript-flavor-error\",\n * import('eslint').Linter.FlatConfig\n * >\n * }}\n */\nconst index = {\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 '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 ? {name: 'jsdoc/' + flatName} : {}),\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/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 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 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 indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/no-undefined-types': 'off',\n /* eslint-enable indent */\n },\n };\n};\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.examples = /** @type {import('eslint').Linter.FlatConfig[]} */ ([\n {\n name: 'jsdoc/examples/processor',\n files: ['**/*.js'],\n plugins: {\n examples: getJsdocProcessorPlugin()\n },\n processor: 'examples/examples',\n },\n {\n name: 'jsdoc/examples/rules',\n files: ['**/*.md/*.js'],\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: ['**/*.js'],\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 name: 'jsdoc/default-expressions/rules',\n files: ['**/*.jsdoc-defaults', '**/*.jsdoc-params', '**/*.jsdoc-properties'],\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,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,I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C,OAAO,EAAE;IACPQ,QAAQ,EAAE,IAAAE,gDAAuB,EAAC;MAChCE,aAAa,EAAE,IAAI;MACnBC,WAAW,EAAE,IAAI;MACjBC,eAAe,EAAE;IACnB,CAAC;EACH;AACF,CAAC,EACD,GAAG7E,KAAK,CAACC,OAAO,CAACsE,QAAQ,CAACU,GAAG,CAAEC,MAAM,IAAK;EACxC,OAAO;IACL,GAAGA,MAAM;IACTnB,OAAO,EAAE,CAAC;EACZ,CAAC;AACH,CAAC,CAAC,EACF,GAAG/D,KAAK,CAACC,OAAO,CAAC,qBAAqB,CAAC,CAACgF,GAAG,CAAEC,MAAM,IAAK;EACtD,OAAO;IACL,GAAGA,MAAM;IACTnB,OAAO,EAAE,CAAC;EACZ,CAAC;AACH,CAAC,CAAC,CACF;AAAC,IAAAoB,QAAA,GAAAC,OAAA,CAAArF,OAAA,GAEYC,KAAK;AAAAqF,MAAA,CAAAD,OAAA,GAAAA,OAAA,CAAArF,OAAA","ignoreList":[]}
|
|
@@ -100,7 +100,7 @@ var _default = exports.default = (0, _iterateJsdoc.default)(({
|
|
|
100
100
|
globalState
|
|
101
101
|
}) => {
|
|
102
102
|
if (_semver.default.gte(_eslint.ESLint.version, '8.0.0')) {
|
|
103
|
-
report('This rule
|
|
103
|
+
report('This rule does not work for ESLint 8+; you should disable this rule and use' + 'the processor mentioned in the docs.', null, {
|
|
104
104
|
column: 1,
|
|
105
105
|
line: 1
|
|
106
106
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkExamples.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","_eslint","_interopRequireWildcard","_semver","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CLIEngine","eslint","zeroBasedLineIndexAdjust","likelyNestedJSDocIndentSpace","preTagSpaceLength","firstLinePrefixLength","hasCaptionRegex","escapeStringRegexp","str","replaceAll","countChars","ch","match","RegExp","length","defaultMdRules","defaultExpressionRules","quotes","semi","strict","getLinesCols","text","matchLines","colDelta","slice","lastIndexOf","_default","exports","iterateJsdoc","report","utils","context","globalState","semver","gte","ESLint","version","column","line","Map","matchingFileNameMap","options","exampleCodeRegex","rejectExampleCodeRegex","checkDefaults","checkParams","checkProperties","noDefaultExampleRules","checkEslintrc","matchingFileName","matchingFileNameDefaults","matchingFileNameParams","matchingFileNameProperties","paddedIndent","baseConfig","configFile","allowInlineConfig","reportUnusedDisableDirectives","captionRequired","rulePaths","mdRules","undefined","expressionRules","getRegexFromString","checkSource","filename","defaultFileName","rules","lines","cols","skipInit","source","targetTagName","sources","tag","push","nonJSPrefacingCols","nonJSPrefacingLines","string","checkRules","cliConfig","useEslintrc","cliConfigStr","JSON","stringify","src","fileNameMapKey","file","cliFile","cli","config","getConfigForFile","results","messages","executeOnText","number","codeStartLine","codeStartCol","message","severity","ruleId","startLine","startCol","targetSource","getFilenameInfo","ext","jsFileName","getFilename","includes","replace","filenameInfo","forEachPreferredTag","description","trim","getTagDescription","tagName","getPreferredTagName","hasTag","matchingFilenameInfo","test","startingIndex","lastStringCount","exampleCode","lastIndex","exec","index","n0","n1","preMatch","preMatchLines","nonJSPreface","nonJSPrefaceLineCount","idx","indexOf","charsInLastLine","global","iterateAllJsdocs","meta","docs","url","schema","additionalProperties","properties","type","module"],"sources":["../../src/rules/checkExamples.js"],"sourcesContent":["// Todo: When replace `CLIEngine` with `ESLint` when feature set complete per https://github.com/eslint/eslint/issues/14745\n// https://github.com/eslint/eslint/blob/master/docs/user-guide/migrating-to-7.0.0.md#-the-cliengine-class-has-been-deprecated\nimport iterateJsdoc from '../iterateJsdoc.js';\nimport eslint, {\n ESLint,\n} from 'eslint';\nimport semver from 'semver';\n\nconst {\n // @ts-expect-error Older ESLint\n CLIEngine,\n} = eslint;\n\nconst zeroBasedLineIndexAdjust = -1;\nconst likelyNestedJSDocIndentSpace = 1;\nconst preTagSpaceLength = 1;\n\n// If a space is present, we should ignore it\nconst firstLinePrefixLength = preTagSpaceLength;\n\nconst hasCaptionRegex = /^\\s*<caption>([\\s\\S]*?)<\\/caption>/u;\n\n/**\n * @param {string} str\n * @returns {string}\n */\nconst escapeStringRegexp = (str) => {\n return str.replaceAll(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&');\n};\n\n/**\n * @param {string} str\n * @param {string} ch\n * @returns {import('../iterateJsdoc.js').Integer}\n */\nconst countChars = (str, ch) => {\n return (str.match(new RegExp(escapeStringRegexp(ch), 'gu')) || []).length;\n};\n\n/** @type {import('eslint').Linter.RulesRecord} */\nconst defaultMdRules = {\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/** @type {import('eslint').Linter.RulesRecord} */\nconst defaultExpressionRules = {\n ...defaultMdRules,\n 'chai-friendly/no-unused-expressions': 'off',\n 'no-empty-function': 'off',\n 'no-new': 'off',\n 'no-unused-expressions': 'off',\n quotes: [\n 'error', 'double',\n ],\n semi: [\n 'error', 'never',\n ],\n strict: 'off',\n};\n\n/**\n * @param {string} text\n * @returns {[\n * import('../iterateJsdoc.js').Integer,\n * import('../iterateJsdoc.js').Integer\n * ]}\n */\nconst getLinesCols = (text) => {\n const matchLines = countChars(text, '\\n');\n\n const colDelta = matchLines ?\n text.slice(text.lastIndexOf('\\n') + 1).length :\n text.length;\n\n return [\n matchLines, colDelta,\n ];\n};\n\nexport default iterateJsdoc(({\n report,\n utils,\n context,\n globalState,\n}) => {\n if (semver.gte(ESLint.version, '8.0.0')) {\n report(\n 'This rule cannot yet be supported for ESLint 8; you ' +\n 'should either downgrade to ESLint 7 or disable this rule. The ' +\n 'possibility for ESLint 8 support is being tracked at https://github.com/eslint/eslint/issues/14745',\n null,\n {\n column: 1,\n line: 1,\n },\n );\n\n return;\n }\n\n if (!globalState.has('checkExamples-matchingFileName')) {\n globalState.set('checkExamples-matchingFileName', new Map());\n }\n\n const matchingFileNameMap = /** @type {Map<string, string>} */ (\n globalState.get('checkExamples-matchingFileName')\n );\n\n const options = context.options[0] || {};\n let {\n exampleCodeRegex = null,\n rejectExampleCodeRegex = null,\n } = options;\n const {\n checkDefaults = false,\n checkParams = false,\n checkProperties = false,\n noDefaultExampleRules = false,\n checkEslintrc = true,\n matchingFileName = null,\n matchingFileNameDefaults = null,\n matchingFileNameParams = null,\n matchingFileNameProperties = null,\n paddedIndent = 0,\n baseConfig = {},\n configFile,\n allowInlineConfig = true,\n reportUnusedDisableDirectives = true,\n captionRequired = false,\n } = options;\n\n // Make this configurable?\n /**\n * @type {never[]}\n */\n const rulePaths = [];\n\n const mdRules = noDefaultExampleRules ? undefined : defaultMdRules;\n\n const expressionRules = noDefaultExampleRules ? undefined : defaultExpressionRules;\n\n if (exampleCodeRegex) {\n exampleCodeRegex = utils.getRegexFromString(exampleCodeRegex);\n }\n\n if (rejectExampleCodeRegex) {\n rejectExampleCodeRegex = utils.getRegexFromString(rejectExampleCodeRegex);\n }\n\n /**\n * @param {{\n * filename: string,\n * defaultFileName: string|undefined,\n * source: string,\n * targetTagName: string,\n * rules?: import('eslint').Linter.RulesRecord|undefined,\n * lines?: import('../iterateJsdoc.js').Integer,\n * cols?: import('../iterateJsdoc.js').Integer,\n * skipInit?: boolean,\n * sources?: {\n * nonJSPrefacingCols: import('../iterateJsdoc.js').Integer,\n * nonJSPrefacingLines: import('../iterateJsdoc.js').Integer,\n * string: string,\n * }[],\n * tag?: import('comment-parser').Spec & {\n * line?: import('../iterateJsdoc.js').Integer,\n * }|{\n * line: import('../iterateJsdoc.js').Integer,\n * }\n * }} cfg\n */\n const checkSource = ({\n filename,\n defaultFileName,\n rules = expressionRules,\n lines = 0,\n cols = 0,\n skipInit,\n source,\n targetTagName,\n sources = [],\n tag = {\n line: 0,\n },\n }) => {\n if (!skipInit) {\n sources.push({\n nonJSPrefacingCols: cols,\n nonJSPrefacingLines: lines,\n string: source,\n });\n }\n\n // Todo: Make fixable\n\n /**\n * @param {{\n * nonJSPrefacingCols: import('../iterateJsdoc.js').Integer,\n * nonJSPrefacingLines: import('../iterateJsdoc.js').Integer,\n * string: string\n * }} cfg\n */\n const checkRules = function ({\n nonJSPrefacingCols,\n nonJSPrefacingLines,\n string,\n }) {\n const cliConfig = {\n allowInlineConfig,\n baseConfig,\n configFile,\n reportUnusedDisableDirectives,\n rulePaths,\n rules,\n useEslintrc: checkEslintrc,\n };\n const cliConfigStr = JSON.stringify(cliConfig);\n\n const src = paddedIndent ?\n string.replaceAll(new RegExp(`(^|\\n) {${paddedIndent}}(?!$)`, 'gu'), '\\n') :\n string;\n\n // Programmatic ESLint API: https://eslint.org/docs/developer-guide/nodejs-api\n const fileNameMapKey = filename ?\n 'a' + cliConfigStr + filename :\n 'b' + cliConfigStr + defaultFileName;\n const file = filename || defaultFileName;\n let cliFile;\n if (matchingFileNameMap.has(fileNameMapKey)) {\n cliFile = matchingFileNameMap.get(fileNameMapKey);\n } else {\n const cli = new CLIEngine(cliConfig);\n let config;\n if (filename || checkEslintrc) {\n config = cli.getConfigForFile(file);\n }\n\n // We need a new instance to ensure that the rules that may only\n // be available to `file` (if it has its own `.eslintrc`),\n // will be defined.\n cliFile = new CLIEngine({\n allowInlineConfig,\n baseConfig: {\n ...baseConfig,\n ...config,\n },\n configFile,\n reportUnusedDisableDirectives,\n rulePaths,\n rules,\n useEslintrc: false,\n });\n matchingFileNameMap.set(fileNameMapKey, cliFile);\n }\n\n const {\n results: [\n {\n messages,\n },\n ],\n } = cliFile.executeOnText(src);\n\n if (!('line' in tag)) {\n tag.line = tag.source[0].number;\n }\n\n // NOTE: `tag.line` can be 0 if of form `/** @tag ... */`\n const codeStartLine = /**\n * @type {import('comment-parser').Spec & {\n * line: import('../iterateJsdoc.js').Integer,\n * }}\n */ (tag).line + nonJSPrefacingLines;\n const codeStartCol = likelyNestedJSDocIndentSpace;\n\n for (const {\n message,\n line,\n column,\n severity,\n ruleId,\n } of messages) {\n const startLine = codeStartLine + line + zeroBasedLineIndexAdjust;\n const startCol = codeStartCol + (\n\n // This might not work for line 0, but line 0 is unlikely for examples\n line <= 1 ? nonJSPrefacingCols + firstLinePrefixLength : preTagSpaceLength\n ) + column;\n\n report(\n '@' + targetTagName + ' ' + (severity === 2 ? 'error' : 'warning') +\n (ruleId ? ' (' + ruleId + ')' : '') + ': ' +\n message,\n null,\n {\n column: startCol,\n line: startLine,\n },\n );\n }\n };\n\n for (const targetSource of sources) {\n checkRules(targetSource);\n }\n };\n\n /**\n *\n * @param {string} filename\n * @param {string} [ext] Since `eslint-plugin-markdown` v2, and\n * ESLint 7, this is the default which other JS-fenced rules will used.\n * Formerly \"md\" was the default.\n * @returns {{defaultFileName: string|undefined, filename: string}}\n */\n const getFilenameInfo = (filename, ext = 'md/*.js') => {\n let defaultFileName;\n if (!filename) {\n const jsFileName = context.getFilename();\n if (typeof jsFileName === 'string' && jsFileName.includes('.')) {\n defaultFileName = jsFileName.replace(/\\.[^.]*$/u, `.${ext}`);\n } else {\n defaultFileName = `dummy.${ext}`;\n }\n }\n\n return {\n defaultFileName,\n filename,\n };\n };\n\n if (checkDefaults) {\n const filenameInfo = getFilenameInfo(matchingFileNameDefaults, 'jsdoc-defaults');\n utils.forEachPreferredTag('default', (tag, targetTagName) => {\n if (!tag.description.trim()) {\n return;\n }\n\n checkSource({\n source: `(${utils.getTagDescription(tag)})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n if (checkParams) {\n const filenameInfo = getFilenameInfo(matchingFileNameParams, 'jsdoc-params');\n utils.forEachPreferredTag('param', (tag, targetTagName) => {\n if (!tag.default || !tag.default.trim()) {\n return;\n }\n\n checkSource({\n source: `(${tag.default})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n if (checkProperties) {\n const filenameInfo = getFilenameInfo(matchingFileNameProperties, 'jsdoc-properties');\n utils.forEachPreferredTag('property', (tag, targetTagName) => {\n if (!tag.default || !tag.default.trim()) {\n return;\n }\n\n checkSource({\n source: `(${tag.default})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n const tagName = /** @type {string} */ (utils.getPreferredTagName({\n tagName: 'example',\n }));\n if (!utils.hasTag(tagName)) {\n return;\n }\n\n const matchingFilenameInfo = getFilenameInfo(matchingFileName);\n\n utils.forEachPreferredTag('example', (tag, targetTagName) => {\n let source = /** @type {string} */ (utils.getTagDescription(tag));\n const match = source.match(hasCaptionRegex);\n\n if (captionRequired && (!match || !match[1].trim())) {\n report('Caption is expected for examples.', null, tag);\n }\n\n source = source.replace(hasCaptionRegex, '');\n const [\n lines,\n cols,\n ] = match ? getLinesCols(match[0]) : [\n 0, 0,\n ];\n\n if (exampleCodeRegex && !exampleCodeRegex.test(source) ||\n rejectExampleCodeRegex && rejectExampleCodeRegex.test(source)\n ) {\n return;\n }\n\n const sources = [];\n let skipInit = false;\n if (exampleCodeRegex) {\n let nonJSPrefacingCols = 0;\n let nonJSPrefacingLines = 0;\n\n let startingIndex = 0;\n let lastStringCount = 0;\n\n let exampleCode;\n exampleCodeRegex.lastIndex = 0;\n while ((exampleCode = exampleCodeRegex.exec(source)) !== null) {\n const {\n index,\n '0': n0,\n '1': n1,\n } = exampleCode;\n\n // Count anything preceding user regex match (can affect line numbering)\n const preMatch = source.slice(startingIndex, index);\n\n const [\n preMatchLines,\n colDelta,\n ] = getLinesCols(preMatch);\n\n let nonJSPreface;\n let nonJSPrefaceLineCount;\n if (n1) {\n const idx = n0.indexOf(n1);\n nonJSPreface = n0.slice(0, idx);\n nonJSPrefaceLineCount = countChars(nonJSPreface, '\\n');\n } else {\n nonJSPreface = '';\n nonJSPrefaceLineCount = 0;\n }\n\n nonJSPrefacingLines += lastStringCount + preMatchLines + nonJSPrefaceLineCount;\n\n // Ignore `preMatch` delta if newlines here\n if (nonJSPrefaceLineCount) {\n const charsInLastLine = nonJSPreface.slice(nonJSPreface.lastIndexOf('\\n') + 1).length;\n\n nonJSPrefacingCols += charsInLastLine;\n } else {\n nonJSPrefacingCols += colDelta + nonJSPreface.length;\n }\n\n const string = n1 || n0;\n sources.push({\n nonJSPrefacingCols,\n nonJSPrefacingLines,\n string,\n });\n startingIndex = exampleCodeRegex.lastIndex;\n lastStringCount = countChars(string, '\\n');\n if (!exampleCodeRegex.global) {\n break;\n }\n }\n\n skipInit = true;\n }\n\n checkSource({\n cols,\n lines,\n rules: mdRules,\n skipInit,\n source,\n sources,\n tag,\n targetTagName,\n ...matchingFilenameInfo,\n });\n });\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n allowInlineConfig: {\n default: true,\n type: 'boolean',\n },\n baseConfig: {\n type: 'object',\n },\n captionRequired: {\n default: false,\n type: 'boolean',\n },\n checkDefaults: {\n default: false,\n type: 'boolean',\n },\n checkEslintrc: {\n default: true,\n type: 'boolean',\n },\n checkParams: {\n default: false,\n type: 'boolean',\n },\n checkProperties: {\n default: false,\n type: 'boolean',\n },\n configFile: {\n type: 'string',\n },\n exampleCodeRegex: {\n type: 'string',\n },\n matchingFileName: {\n type: 'string',\n },\n matchingFileNameDefaults: {\n type: 'string',\n },\n matchingFileNameParams: {\n type: 'string',\n },\n matchingFileNameProperties: {\n type: 'string',\n },\n noDefaultExampleRules: {\n default: false,\n type: 'boolean',\n },\n paddedIndent: {\n default: 0,\n type: 'integer',\n },\n rejectExampleCodeRegex: {\n type: 'string',\n },\n reportUnusedDisableDirectives: {\n default: true,\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAEA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,uBAAA,CAAAF,OAAA;AAGA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAA4B,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA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AC;UACV6J,IAAI,EAAE;QACR,CAAC;QACDpG,sBAAsB,EAAE;UACtBoG,IAAI,EAAE;QACR,CAAC;QACDtF,6BAA6B,EAAE;UAC7BvE,OAAO,EAAE,IAAI;UACb6J,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAC,MAAA,CAAArH,OAAA,GAAAA,OAAA,CAAAzC,OAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"checkExamples.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","_eslint","_interopRequireWildcard","_semver","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CLIEngine","eslint","zeroBasedLineIndexAdjust","likelyNestedJSDocIndentSpace","preTagSpaceLength","firstLinePrefixLength","hasCaptionRegex","escapeStringRegexp","str","replaceAll","countChars","ch","match","RegExp","length","defaultMdRules","defaultExpressionRules","quotes","semi","strict","getLinesCols","text","matchLines","colDelta","slice","lastIndexOf","_default","exports","iterateJsdoc","report","utils","context","globalState","semver","gte","ESLint","version","column","line","Map","matchingFileNameMap","options","exampleCodeRegex","rejectExampleCodeRegex","checkDefaults","checkParams","checkProperties","noDefaultExampleRules","checkEslintrc","matchingFileName","matchingFileNameDefaults","matchingFileNameParams","matchingFileNameProperties","paddedIndent","baseConfig","configFile","allowInlineConfig","reportUnusedDisableDirectives","captionRequired","rulePaths","mdRules","undefined","expressionRules","getRegexFromString","checkSource","filename","defaultFileName","rules","lines","cols","skipInit","source","targetTagName","sources","tag","push","nonJSPrefacingCols","nonJSPrefacingLines","string","checkRules","cliConfig","useEslintrc","cliConfigStr","JSON","stringify","src","fileNameMapKey","file","cliFile","cli","config","getConfigForFile","results","messages","executeOnText","number","codeStartLine","codeStartCol","message","severity","ruleId","startLine","startCol","targetSource","getFilenameInfo","ext","jsFileName","getFilename","includes","replace","filenameInfo","forEachPreferredTag","description","trim","getTagDescription","tagName","getPreferredTagName","hasTag","matchingFilenameInfo","test","startingIndex","lastStringCount","exampleCode","lastIndex","exec","index","n0","n1","preMatch","preMatchLines","nonJSPreface","nonJSPrefaceLineCount","idx","indexOf","charsInLastLine","global","iterateAllJsdocs","meta","docs","url","schema","additionalProperties","properties","type","module"],"sources":["../../src/rules/checkExamples.js"],"sourcesContent":["// Todo: When replace `CLIEngine` with `ESLint` when feature set complete per https://github.com/eslint/eslint/issues/14745\n// https://github.com/eslint/eslint/blob/master/docs/user-guide/migrating-to-7.0.0.md#-the-cliengine-class-has-been-deprecated\nimport iterateJsdoc from '../iterateJsdoc.js';\nimport eslint, {\n ESLint,\n} from 'eslint';\nimport semver from 'semver';\n\nconst {\n // @ts-expect-error Older ESLint\n CLIEngine,\n} = eslint;\n\nconst zeroBasedLineIndexAdjust = -1;\nconst likelyNestedJSDocIndentSpace = 1;\nconst preTagSpaceLength = 1;\n\n// If a space is present, we should ignore it\nconst firstLinePrefixLength = preTagSpaceLength;\n\nconst hasCaptionRegex = /^\\s*<caption>([\\s\\S]*?)<\\/caption>/u;\n\n/**\n * @param {string} str\n * @returns {string}\n */\nconst escapeStringRegexp = (str) => {\n return str.replaceAll(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&');\n};\n\n/**\n * @param {string} str\n * @param {string} ch\n * @returns {import('../iterateJsdoc.js').Integer}\n */\nconst countChars = (str, ch) => {\n return (str.match(new RegExp(escapeStringRegexp(ch), 'gu')) || []).length;\n};\n\n/** @type {import('eslint').Linter.RulesRecord} */\nconst defaultMdRules = {\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/** @type {import('eslint').Linter.RulesRecord} */\nconst defaultExpressionRules = {\n ...defaultMdRules,\n 'chai-friendly/no-unused-expressions': 'off',\n 'no-empty-function': 'off',\n 'no-new': 'off',\n 'no-unused-expressions': 'off',\n quotes: [\n 'error', 'double',\n ],\n semi: [\n 'error', 'never',\n ],\n strict: 'off',\n};\n\n/**\n * @param {string} text\n * @returns {[\n * import('../iterateJsdoc.js').Integer,\n * import('../iterateJsdoc.js').Integer\n * ]}\n */\nconst getLinesCols = (text) => {\n const matchLines = countChars(text, '\\n');\n\n const colDelta = matchLines ?\n text.slice(text.lastIndexOf('\\n') + 1).length :\n text.length;\n\n return [\n matchLines, colDelta,\n ];\n};\n\nexport default iterateJsdoc(({\n report,\n utils,\n context,\n globalState,\n}) => {\n if (semver.gte(ESLint.version, '8.0.0')) {\n report(\n 'This rule does not work for ESLint 8+; you should disable this rule and use' +\n 'the processor mentioned in the docs.',\n null,\n {\n column: 1,\n line: 1,\n },\n );\n\n return;\n }\n\n if (!globalState.has('checkExamples-matchingFileName')) {\n globalState.set('checkExamples-matchingFileName', new Map());\n }\n\n const matchingFileNameMap = /** @type {Map<string, string>} */ (\n globalState.get('checkExamples-matchingFileName')\n );\n\n const options = context.options[0] || {};\n let {\n exampleCodeRegex = null,\n rejectExampleCodeRegex = null,\n } = options;\n const {\n checkDefaults = false,\n checkParams = false,\n checkProperties = false,\n noDefaultExampleRules = false,\n checkEslintrc = true,\n matchingFileName = null,\n matchingFileNameDefaults = null,\n matchingFileNameParams = null,\n matchingFileNameProperties = null,\n paddedIndent = 0,\n baseConfig = {},\n configFile,\n allowInlineConfig = true,\n reportUnusedDisableDirectives = true,\n captionRequired = false,\n } = options;\n\n // Make this configurable?\n /**\n * @type {never[]}\n */\n const rulePaths = [];\n\n const mdRules = noDefaultExampleRules ? undefined : defaultMdRules;\n\n const expressionRules = noDefaultExampleRules ? undefined : defaultExpressionRules;\n\n if (exampleCodeRegex) {\n exampleCodeRegex = utils.getRegexFromString(exampleCodeRegex);\n }\n\n if (rejectExampleCodeRegex) {\n rejectExampleCodeRegex = utils.getRegexFromString(rejectExampleCodeRegex);\n }\n\n /**\n * @param {{\n * filename: string,\n * defaultFileName: string|undefined,\n * source: string,\n * targetTagName: string,\n * rules?: import('eslint').Linter.RulesRecord|undefined,\n * lines?: import('../iterateJsdoc.js').Integer,\n * cols?: import('../iterateJsdoc.js').Integer,\n * skipInit?: boolean,\n * sources?: {\n * nonJSPrefacingCols: import('../iterateJsdoc.js').Integer,\n * nonJSPrefacingLines: import('../iterateJsdoc.js').Integer,\n * string: string,\n * }[],\n * tag?: import('comment-parser').Spec & {\n * line?: import('../iterateJsdoc.js').Integer,\n * }|{\n * line: import('../iterateJsdoc.js').Integer,\n * }\n * }} cfg\n */\n const checkSource = ({\n filename,\n defaultFileName,\n rules = expressionRules,\n lines = 0,\n cols = 0,\n skipInit,\n source,\n targetTagName,\n sources = [],\n tag = {\n line: 0,\n },\n }) => {\n if (!skipInit) {\n sources.push({\n nonJSPrefacingCols: cols,\n nonJSPrefacingLines: lines,\n string: source,\n });\n }\n\n // Todo: Make fixable\n\n /**\n * @param {{\n * nonJSPrefacingCols: import('../iterateJsdoc.js').Integer,\n * nonJSPrefacingLines: import('../iterateJsdoc.js').Integer,\n * string: string\n * }} cfg\n */\n const checkRules = function ({\n nonJSPrefacingCols,\n nonJSPrefacingLines,\n string,\n }) {\n const cliConfig = {\n allowInlineConfig,\n baseConfig,\n configFile,\n reportUnusedDisableDirectives,\n rulePaths,\n rules,\n useEslintrc: checkEslintrc,\n };\n const cliConfigStr = JSON.stringify(cliConfig);\n\n const src = paddedIndent ?\n string.replaceAll(new RegExp(`(^|\\n) {${paddedIndent}}(?!$)`, 'gu'), '\\n') :\n string;\n\n // Programmatic ESLint API: https://eslint.org/docs/developer-guide/nodejs-api\n const fileNameMapKey = filename ?\n 'a' + cliConfigStr + filename :\n 'b' + cliConfigStr + defaultFileName;\n const file = filename || defaultFileName;\n let cliFile;\n if (matchingFileNameMap.has(fileNameMapKey)) {\n cliFile = matchingFileNameMap.get(fileNameMapKey);\n } else {\n const cli = new CLIEngine(cliConfig);\n let config;\n if (filename || checkEslintrc) {\n config = cli.getConfigForFile(file);\n }\n\n // We need a new instance to ensure that the rules that may only\n // be available to `file` (if it has its own `.eslintrc`),\n // will be defined.\n cliFile = new CLIEngine({\n allowInlineConfig,\n baseConfig: {\n ...baseConfig,\n ...config,\n },\n configFile,\n reportUnusedDisableDirectives,\n rulePaths,\n rules,\n useEslintrc: false,\n });\n matchingFileNameMap.set(fileNameMapKey, cliFile);\n }\n\n const {\n results: [\n {\n messages,\n },\n ],\n } = cliFile.executeOnText(src);\n\n if (!('line' in tag)) {\n tag.line = tag.source[0].number;\n }\n\n // NOTE: `tag.line` can be 0 if of form `/** @tag ... */`\n const codeStartLine = /**\n * @type {import('comment-parser').Spec & {\n * line: import('../iterateJsdoc.js').Integer,\n * }}\n */ (tag).line + nonJSPrefacingLines;\n const codeStartCol = likelyNestedJSDocIndentSpace;\n\n for (const {\n message,\n line,\n column,\n severity,\n ruleId,\n } of messages) {\n const startLine = codeStartLine + line + zeroBasedLineIndexAdjust;\n const startCol = codeStartCol + (\n\n // This might not work for line 0, but line 0 is unlikely for examples\n line <= 1 ? nonJSPrefacingCols + firstLinePrefixLength : preTagSpaceLength\n ) + column;\n\n report(\n '@' + targetTagName + ' ' + (severity === 2 ? 'error' : 'warning') +\n (ruleId ? ' (' + ruleId + ')' : '') + ': ' +\n message,\n null,\n {\n column: startCol,\n line: startLine,\n },\n );\n }\n };\n\n for (const targetSource of sources) {\n checkRules(targetSource);\n }\n };\n\n /**\n *\n * @param {string} filename\n * @param {string} [ext] Since `eslint-plugin-markdown` v2, and\n * ESLint 7, this is the default which other JS-fenced rules will used.\n * Formerly \"md\" was the default.\n * @returns {{defaultFileName: string|undefined, filename: string}}\n */\n const getFilenameInfo = (filename, ext = 'md/*.js') => {\n let defaultFileName;\n if (!filename) {\n const jsFileName = context.getFilename();\n if (typeof jsFileName === 'string' && jsFileName.includes('.')) {\n defaultFileName = jsFileName.replace(/\\.[^.]*$/u, `.${ext}`);\n } else {\n defaultFileName = `dummy.${ext}`;\n }\n }\n\n return {\n defaultFileName,\n filename,\n };\n };\n\n if (checkDefaults) {\n const filenameInfo = getFilenameInfo(matchingFileNameDefaults, 'jsdoc-defaults');\n utils.forEachPreferredTag('default', (tag, targetTagName) => {\n if (!tag.description.trim()) {\n return;\n }\n\n checkSource({\n source: `(${utils.getTagDescription(tag)})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n if (checkParams) {\n const filenameInfo = getFilenameInfo(matchingFileNameParams, 'jsdoc-params');\n utils.forEachPreferredTag('param', (tag, targetTagName) => {\n if (!tag.default || !tag.default.trim()) {\n return;\n }\n\n checkSource({\n source: `(${tag.default})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n if (checkProperties) {\n const filenameInfo = getFilenameInfo(matchingFileNameProperties, 'jsdoc-properties');\n utils.forEachPreferredTag('property', (tag, targetTagName) => {\n if (!tag.default || !tag.default.trim()) {\n return;\n }\n\n checkSource({\n source: `(${tag.default})`,\n targetTagName,\n ...filenameInfo,\n });\n });\n }\n\n const tagName = /** @type {string} */ (utils.getPreferredTagName({\n tagName: 'example',\n }));\n if (!utils.hasTag(tagName)) {\n return;\n }\n\n const matchingFilenameInfo = getFilenameInfo(matchingFileName);\n\n utils.forEachPreferredTag('example', (tag, targetTagName) => {\n let source = /** @type {string} */ (utils.getTagDescription(tag));\n const match = source.match(hasCaptionRegex);\n\n if (captionRequired && (!match || !match[1].trim())) {\n report('Caption is expected for examples.', null, tag);\n }\n\n source = source.replace(hasCaptionRegex, '');\n const [\n lines,\n cols,\n ] = match ? getLinesCols(match[0]) : [\n 0, 0,\n ];\n\n if (exampleCodeRegex && !exampleCodeRegex.test(source) ||\n rejectExampleCodeRegex && rejectExampleCodeRegex.test(source)\n ) {\n return;\n }\n\n const sources = [];\n let skipInit = false;\n if (exampleCodeRegex) {\n let nonJSPrefacingCols = 0;\n let nonJSPrefacingLines = 0;\n\n let startingIndex = 0;\n let lastStringCount = 0;\n\n let exampleCode;\n exampleCodeRegex.lastIndex = 0;\n while ((exampleCode = exampleCodeRegex.exec(source)) !== null) {\n const {\n index,\n '0': n0,\n '1': n1,\n } = exampleCode;\n\n // Count anything preceding user regex match (can affect line numbering)\n const preMatch = source.slice(startingIndex, index);\n\n const [\n preMatchLines,\n colDelta,\n ] = getLinesCols(preMatch);\n\n let nonJSPreface;\n let nonJSPrefaceLineCount;\n if (n1) {\n const idx = n0.indexOf(n1);\n nonJSPreface = n0.slice(0, idx);\n nonJSPrefaceLineCount = countChars(nonJSPreface, '\\n');\n } else {\n nonJSPreface = '';\n nonJSPrefaceLineCount = 0;\n }\n\n nonJSPrefacingLines += lastStringCount + preMatchLines + nonJSPrefaceLineCount;\n\n // Ignore `preMatch` delta if newlines here\n if (nonJSPrefaceLineCount) {\n const charsInLastLine = nonJSPreface.slice(nonJSPreface.lastIndexOf('\\n') + 1).length;\n\n nonJSPrefacingCols += charsInLastLine;\n } else {\n nonJSPrefacingCols += colDelta + nonJSPreface.length;\n }\n\n const string = n1 || n0;\n sources.push({\n nonJSPrefacingCols,\n nonJSPrefacingLines,\n string,\n });\n startingIndex = exampleCodeRegex.lastIndex;\n lastStringCount = countChars(string, '\\n');\n if (!exampleCodeRegex.global) {\n break;\n }\n }\n\n skipInit = true;\n }\n\n checkSource({\n cols,\n lines,\n rules: mdRules,\n skipInit,\n source,\n sources,\n tag,\n targetTagName,\n ...matchingFilenameInfo,\n });\n });\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n allowInlineConfig: {\n default: true,\n type: 'boolean',\n },\n baseConfig: {\n type: 'object',\n },\n captionRequired: {\n default: false,\n type: 'boolean',\n },\n checkDefaults: {\n default: false,\n type: 'boolean',\n },\n checkEslintrc: {\n default: true,\n type: 'boolean',\n },\n checkParams: {\n default: false,\n type: 'boolean',\n },\n checkProperties: {\n default: false,\n type: 'boolean',\n },\n configFile: {\n type: 'string',\n },\n exampleCodeRegex: {\n type: 'string',\n },\n matchingFileName: {\n type: 'string',\n },\n matchingFileNameDefaults: {\n type: 'string',\n },\n matchingFileNameParams: {\n type: 'string',\n },\n matchingFileNameProperties: {\n type: 'string',\n },\n noDefaultExampleRules: {\n default: false,\n type: 'boolean',\n },\n paddedIndent: {\n default: 0,\n type: 'integer',\n },\n rejectExampleCodeRegex: {\n type: 'string',\n },\n reportUnusedDisableDirectives: {\n default: true,\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAEA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,uBAAA,CAAAF,OAAA;AAGA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAA4B,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,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,KAAK;UACd6J,IAAI,EAAE;QACR,CAAC;QACDjG,eAAe,EAAE;UACf5D,OAAO,EAAE,KAAK;UACd6J,IAAI,EAAE;QACR,CAAC;QACDxF,UAAU,EAAE;UACVwF,IAAI,EAAE;QACR,CAAC;QACDrG,gBAAgB,EAAE;UAChBqG,IAAI,EAAE;QACR,CAAC;QACD9F,gBAAgB,EAAE;UAChB8F,IAAI,EAAE;QACR,CAAC;QACD7F,wBAAwB,EAAE;UACxB6F,IAAI,EAAE;QACR,CAAC;QACD5F,sBAAsB,EAAE;UACtB4F,IAAI,EAAE;QACR,CAAC;QACD3F,0BAA0B,EAAE;UAC1B2F,IAAI,EAAE;QACR,CAAC;QACDhG,qBAAqB,EAAE;UACrB7D,OAAO,EAAE,KAAK;UACd6J,IAAI,EAAE;QACR,CAAC;QACD1F,YAAY,EAAE;UACZnE,OAAO,EAAE,CAAC;UACV6J,IAAI,EAAE;QACR,CAAC;QACDpG,sBAAsB,EAAE;UACtBoG,IAAI,EAAE;QACR,CAAC;QACDtF,6BAA6B,EAAE;UAC7BvE,OAAO,EAAE,IAAI;UACb6J,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAC,MAAA,CAAArH,OAAA,GAAAA,OAAA,CAAAzC,OAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// Todo: Support TS by fenced block type
|
|
2
2
|
|
|
3
|
-
import {readFileSync} from 'fs';
|
|
3
|
+
import {readFileSync} from 'node:fs';
|
|
4
|
+
import { dirname, join } from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
4
6
|
import * as espree from 'espree';
|
|
5
7
|
import {
|
|
6
8
|
getRegexFromString,
|
|
@@ -13,9 +15,11 @@ import {
|
|
|
13
15
|
parseComment,
|
|
14
16
|
} from '@es-joy/jsdoccomment';
|
|
15
17
|
|
|
18
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
19
|
+
|
|
16
20
|
const {version} = JSON.parse(
|
|
17
21
|
// @ts-expect-error `Buffer` is ok for `JSON.parse`
|
|
18
|
-
readFileSync('
|
|
22
|
+
readFileSync(join(__dirname, '../package.json'))
|
|
19
23
|
);
|
|
20
24
|
|
|
21
25
|
// const zeroBasedLineIndexAdjust = -1;
|
package/src/index.js
CHANGED
|
@@ -371,12 +371,16 @@ index.configs['examples-and-default-expressions'] = /** @type {import('eslint').
|
|
|
371
371
|
},
|
|
372
372
|
},
|
|
373
373
|
...index.configs.examples.map((config) => {
|
|
374
|
-
|
|
375
|
-
|
|
374
|
+
return {
|
|
375
|
+
...config,
|
|
376
|
+
plugins: {}
|
|
377
|
+
};
|
|
376
378
|
}),
|
|
377
379
|
...index.configs['default-expressions'].map((config) => {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
+
return {
|
|
381
|
+
...config,
|
|
382
|
+
plugins: {}
|
|
383
|
+
};
|
|
380
384
|
})
|
|
381
385
|
]);
|
|
382
386
|
|
|
@@ -117,9 +117,8 @@ export default iterateJsdoc(({
|
|
|
117
117
|
}) => {
|
|
118
118
|
if (semver.gte(ESLint.version, '8.0.0')) {
|
|
119
119
|
report(
|
|
120
|
-
'This rule
|
|
121
|
-
'
|
|
122
|
-
'possibility for ESLint 8 support is being tracked at https://github.com/eslint/eslint/issues/14745',
|
|
120
|
+
'This rule does not work for ESLint 8+; you should disable this rule and use' +
|
|
121
|
+
'the processor mentioned in the docs.',
|
|
123
122
|
null,
|
|
124
123
|
{
|
|
125
124
|
column: 1,
|