Closed
Description
Initially filed in jsdoctypeparser/jsdoctypeparser#132
Expected behavior
Multiline object types should get recognized if they use indentation.
Actual behavior
require-param-description
does give an error because the type is not parsed correctly
ESLint Config
{
env: {
es6: true
},
plugins: ['jsdoc'],
rules: {
"jsdoc/check-indentation": 'off',
"jsdoc/require-param-description": 'error'
}
}
ESLint sample
/**
* Checks if the XML document sort of equals another XML document.
* @param {Object} obj The other object.
* @param {{includeWhiteSpace: (boolean|undefined),
* ignoreElementOrder: (boolean|undefined)}} [options] The options.
* @return {expect.Assertion} The assertion.
*/
expect.Assertion.prototype.xmleql = function (obj, options) {
if (obj && obj.nodeType == 9) {
obj = obj.documentElement;
}
if (this.obj && this.obj.nodeType == 9) {
this.obj = this.obj.documentElement;
}
const errors = [];
assertElementNodesEqual(obj, this.obj, options, errors);
const result = errors.length === 0;
this.assert(
!!result,
function () {
return (
'expected ' +
expect.stringify(this.obj) +
' to sort of equal ' +
expect.stringify(obj) +
'\n' +
errors.join('\n')
);
},
function () {
return (
'expected ' +
expect.stringify(this.obj) +
' to sort of not equal ' +
expect.stringify(obj) +
'\n' +
errors.join('\n')
);
}
);
return this;
};
Environment
- Node version: v14.15.4
- ESLint version: v6.14.10
eslint-plugin-jsdoc
version: v31.6.0