eslint-plugin-jsdoc
Advanced tools
Comparing version 48.5.0 to 48.5.1
@@ -11,3 +11,3 @@ { | ||
"comment-parser": "1.4.1", | ||
"debug": "^4.3.4", | ||
"debug": "^4.3.5", | ||
"escape-string-regexp": "^4.0.0", | ||
@@ -22,14 +22,14 @@ "esquery": "^1.5.0", | ||
"devDependencies": { | ||
"@babel/cli": "^7.24.6", | ||
"@babel/core": "^7.24.6", | ||
"@babel/eslint-parser": "^7.24.6", | ||
"@babel/node": "^7.24.6", | ||
"@babel/cli": "^7.24.7", | ||
"@babel/core": "^7.24.7", | ||
"@babel/eslint-parser": "^7.24.7", | ||
"@babel/node": "^7.24.7", | ||
"@babel/plugin-syntax-class-properties": "^7.12.13", | ||
"@babel/plugin-transform-flow-strip-types": "^7.24.6", | ||
"@babel/preset-env": "^7.24.6", | ||
"@babel/plugin-transform-flow-strip-types": "^7.24.7", | ||
"@babel/preset-env": "^7.24.7", | ||
"@es-joy/escodegen": "^3.5.1", | ||
"@es-joy/jsdoc-eslint-parser": "^0.21.1", | ||
"@hkdobrev/run-if-changed": "^0.3.1", | ||
"@semantic-release/commit-analyzer": "^12.0.0", | ||
"@semantic-release/github": "^10.0.5", | ||
"@semantic-release/commit-analyzer": "^13.0.0", | ||
"@semantic-release/github": "^10.0.6", | ||
"@semantic-release/npm": "^12.0.1", | ||
@@ -43,11 +43,11 @@ "@types/chai": "^4.3.16", | ||
"@types/lodash.defaultsdeep": "^4.6.9", | ||
"@types/mocha": "^10.0.6", | ||
"@types/node": "^20.12.12", | ||
"@types/mocha": "^10.0.7", | ||
"@types/node": "^20.14.9", | ||
"@types/semver": "^7.5.8", | ||
"@types/spdx-expression-parse": "^3.0.5", | ||
"@typescript-eslint/parser": "^7.11.0", | ||
"@typescript-eslint/types": "^7.14.1", | ||
"babel-plugin-add-module-exports": "^1.0.4", | ||
"babel-plugin-istanbul": "^6.1.1", | ||
"babel-plugin-transform-import-meta": "^2.2.1", | ||
"c8": "^9.1.0", | ||
"c8": "^10.1.2", | ||
"camelcase": "^6.3.0", | ||
@@ -57,19 +57,20 @@ "chai": "^4.3.10", | ||
"decamelize": "^5.0.1", | ||
"eslint": "9.3.0", | ||
"eslint-config-canonical": "~43.0.12", | ||
"espree": "^10.0.1", | ||
"eslint": "9.5.0", | ||
"eslint-config-canonical": "~43.0.13", | ||
"espree": "^10.1.0", | ||
"gitdown": "^3.1.5", | ||
"glob": "^10.4.1", | ||
"globals": "^15.3.0", | ||
"glob": "^10.4.2", | ||
"globals": "^15.6.0", | ||
"husky": "^9.0.11", | ||
"jsdoc-type-pratt-parser": "^4.0.0", | ||
"json-schema": "^0.4.0", | ||
"lint-staged": "^15.2.5", | ||
"lint-staged": "^15.2.7", | ||
"lodash.defaultsdeep": "^4.6.1", | ||
"mocha": "^10.4.0", | ||
"mocha": "^10.5.2", | ||
"open-editor": "^3.0.0", | ||
"replace": "^1.2.2", | ||
"rimraf": "^5.0.7", | ||
"semantic-release": "^23.1.1", | ||
"typescript": "5.3.x" | ||
"semantic-release": "^24.0.0", | ||
"typescript": "5.3.x", | ||
"typescript-eslint": "^8.0.0-alpha.34" | ||
}, | ||
@@ -144,3 +145,3 @@ "engines": { | ||
"lint-fix": "npm run lint-arg -- --fix .", | ||
"prepare": "husky install", | ||
"prepare": "husky", | ||
"test-no-cov": "cross-env BABEL_ENV=test mocha", | ||
@@ -151,3 +152,3 @@ "test": "c8 npm run test-no-cov", | ||
}, | ||
"version": "48.5.0" | ||
"version": "48.5.1" | ||
} |
@@ -251,3 +251,3 @@ import { | ||
if ([ | ||
// @typescript-eslint/parser, espree, acorn, etc. | ||
// typescript-eslint, espree, acorn, etc. | ||
'SpreadElement', | ||
@@ -254,0 +254,0 @@ |
@@ -439,3 +439,6 @@ import getDefaultTagStructureForMode from './getDefaultTagStructureForMode.js'; | ||
param | ||
).argument).name, | ||
// @ts-expect-error Ok | ||
).argument).name ?? param?.argument?.elements?.map(({name}) => { | ||
return name; | ||
}), | ||
restElement: true, | ||
@@ -442,0 +445,0 @@ }; |
@@ -90,2 +90,20 @@ import iterateJsdoc from '../iterateJsdoc.js'; | ||
} | ||
if ( | ||
typeof functionParameterName === 'object' && | ||
'name' in functionParameterName && | ||
Array.isArray(functionParameterName.name) | ||
) { | ||
const actualName = tag.name.trim(); | ||
const expectedName = functionParameterName.name[index]; | ||
if (actualName === expectedName) { | ||
thisOffset--; | ||
return false; | ||
} | ||
report( | ||
`Expected @${targetTagName} name to be "${expectedName}". Got "${actualName}".`, | ||
null, | ||
tag, | ||
); | ||
return true; | ||
} | ||
@@ -240,2 +258,3 @@ if (Array.isArray(functionParameterName)) { | ||
}); | ||
const expectedNames = functionParameterNames.map((item, idx) => { | ||
@@ -265,3 +284,11 @@ if (/** | ||
report( | ||
`Expected @${targetTagName} names to be "${expectedNames.join(', ')}". Got "${actualNames.join(', ')}".`, | ||
`Expected @${targetTagName} names to be "${ | ||
expectedNames.map((expectedName) => { | ||
return typeof expectedName === 'object' && | ||
'name' in expectedName && | ||
expectedName.restElement | ||
? '...' + expectedName.name | ||
: expectedName; | ||
}).join(', ') | ||
}". Got "${actualNames.join(', ')}".`, | ||
null, | ||
@@ -358,2 +385,3 @@ tag, | ||
const functionParameterNames = utils.getFunctionParameterNames(useDefaultObjectProperties); | ||
const targetTagName = /** @type {string} */ (utils.getPreferredTagName({ | ||
@@ -360,0 +388,0 @@ tagName: 'param', |
@@ -23,2 +23,3 @@ /** | ||
return /** @type {import('@typescript-eslint/types').TSESTree.TSTypeReference} */ (node)?.typeArguments?.params?.[0]?.type === 'TSVoidKeyword' | ||
/* c8 ignore next */ | ||
|| /** @type {import('@typescript-eslint/types').TSESTree.TSTypeReference} */ (node)?.typeParameters?.params?.[0]?.type === 'TSVoidKeyword'; | ||
@@ -25,0 +26,0 @@ }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1862816
30638
51
Updateddebug@^4.3.5